Skip to content

Commit a403c7c

Browse files
authored
Merge pull request #219 from tzw0/FarmLogic
ascii art and minor changes
2 parents d45a49f + 28afb3d commit a403c7c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+738
-101
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
1-
Day ends
1+
2+
* * _ .
3+
_ . ( _ )_ *
4+
( _ )_ (_ _(_ ,)
5+
(_ _(_ ,) *
6+
7+
* *
8+
, . .--.
9+
__|__ |____|
10+
/ \ |____|
11+
/ [] |____|
12+
|__________| |
13+
| ____ | |
14+
| |\ /| | | _[_]_
15+
| | \/ | | | ( " )
16+
| | /\ | | | ,(-)'
17+
|__|/__\|__|__| -"-
18+
_______________________________________________________
19+

build/resources/main/asciiArt/ErrorInExecution/frame0.txt

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,16 @@
1-
0
1+
.______.__________________._________________.
2+
|-Task-|----CONDITION-----|------ACTION-----|
3+
|do | |gotoMarket |
4+
| | |buySeeds |
5+
| | |gotoWheatFarm |
6+
| | |plantSeeds |
7+
| | | |
8+
| | | |
9+
| | | |
10+
| | | |
11+
| | | |
12+
| | | |
13+
| | | |
14+
| | | |
15+
| | | |
16+
|______|__________________|_________________|

build/resources/main/asciiArt/Menu/frame2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ _______________________________________________________
22
__________
33
_.-"` `"-._
44
.'_ _ _ _ _ _ _'.
5-
/ |_ |_||_|| | | | | | \ MENU:
6-
/ | | || \| | | |_| \ Resume Game
5+
/ |_ |_||_|| | | | | | \
6+
/ | | || \| | | |_| \ MENU:
77
; \ Save Game
88
| | Load Game
99
| _. | Quit Game

build/resources/main/asciiArt/TaskCreate/frame0.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
\ \ / /__| | ___ ___ _ __ ___ ___
2-
\ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
3-
\ V V / __/ | (_| (_) | | | | | | __/
4-
\_/\_/ \___|_|\___\___/|_| |_| |_|\___|
5-
_____
6-
|_ _|__
7-
| |/ _ \
8-
| | (_) |
9-
_____ |_|\___/ _
10-
| ___|_ _ _ __ _ __ ___ (_) ___
11-
| |_ / _` | '__| '_ ` _ \| |/ _ \
12-
| _| (_| | | | | | | | | | (_) |
13-
|_| \__,_|_| |_| |_| |_|_|\___/
1+
2+
3+
4+
\ \ / /__| | ___ ___ _ __ ___ ___
5+
\ \ /\ / / _ \ |/ __/ _ \| '_ ` _ \ / _ \
6+
\ V V / __/ | (_| (_) | | | | | | __/
7+
\_/\_/ \___|_|\___\___/|_| |_| |_|\___|
8+
_____
9+
|_ _|__
10+
| |/ _ \
11+
| | (_) |
12+
_____ |_|\___/ _
13+
| ___|_ _ _ __ _ __ ___ (_) ___
14+
| |_ / _` | '__| '_ ` _ \| |/ _ \
15+
| _| (_| | | | | | | | | | (_) |
16+
|_| \__,_|_| |_| |_| |_|_|\___/

src/main/java/commands/CommandAddName.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public void execute(Farmio farmio) throws FarmioException, FarmioFatalException
2525
ui.typeWriter("Welcome Farmer "
2626
+ name
2727
+ ", please press [ENTER] to begin the tutorial"
28-
+ " or enter [skip] to skip the story", false);
28+
+ " or enter [SKIP] to skip the story", false);
2929
farmio.setStage(Farmio.Stage.LEVEL_START);
3030
} else if (name.length() == 0) {
3131
ui.typeWriter("Provide a name.", false);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package commands;
2+
3+
import farmio.Farmio;
4+
import farmio.Storage;
5+
6+
public abstract class CommandChangeTask extends Command {
7+
8+
protected void saveTask(Farmio farmio) {
9+
Storage storage = farmio.getStorage();
10+
storage.storeFarmer(farmio.getFarmer());
11+
}
12+
}

src/main/java/commands/CommandCheckObjectives.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import exceptions.FarmioFatalException;
44
import farmio.Farmio;
55
import farmio.Level;
6+
import frontend.AsciiColours;
67

78
import java.util.List;
89

@@ -15,7 +16,6 @@ public class CommandCheckObjectives extends Command {
1516
@Override
1617
public void execute(Farmio farmio) throws FarmioFatalException {
1718
Level.ObjectiveResult answer = farmio.getLevel().checkAnswer(farmio);
18-
farmio.getSimulation().simulate();
1919
//farmio.getUi().typeWriter(farmio.getLevel().getFeedback(farmio), false); // feedbacks
2020

2121
List<String> feedback = farmio.getLevel().getFeedback(farmio);

0 commit comments

Comments
 (0)