forked from nusCS2113-AY1920S1/PersonalAssistant-Duke
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from tzw0/FarmLogic
fix feedback and organised showmenulist
- Loading branch information
Showing
23 changed files
with
117 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
package commands; | ||
|
||
import exceptions.FarmioFatalException; | ||
import farmio.Farmio; | ||
import farmio.Storage; | ||
|
||
public abstract class CommandChangeTask extends Command { | ||
|
||
protected void saveTask(Farmio farmio) { | ||
protected void saveTaskandResetScreen(Farmio farmio) throws FarmioFatalException { | ||
Storage storage = farmio.getStorage(); | ||
storage.storeFarmer(farmio.getFarmer()); | ||
farmio.getSimulation().simulate(farmio.getLevel().getPath(), farmio.getLevel().getNarratives().size() - 1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Transport Market WheatFarm | ||
______________________________________________________ | ||
gotoMarket | buySeeds | plantSeeds | ||
gotoWheatFarm | sellGrain | harvestWheat | ||
___________________|________________|_________________ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Transport Market WheatFarm | ||
______________________________________________________ | ||
gotoMarket | buySeeds | plantSeeds | ||
gotoWheatFarm | sellGrain | harvestWheat | ||
___________________|________________|_________________ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
GOLD BOOLEAN | ||
______________________________________________________ | ||
greaterThanOrEquals | | ||
greaterThan | | ||
lessThan | | ||
lessThanOrEquals | | ||
_____________________|________________________________ | ||
|
||
Eg: [If gold greaterThanOrEquals 10 do buySeeds] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
GOLD BOOLEAN | ||
______________________________________________________ | ||
greaterThanOrEquals | | ||
greaterThan | | ||
lessThan | | ||
lessThanOrEquals | | ||
_____________________|________________________________ | ||
|
||
Eg: [If gold greaterThanOrEquals 10 do buySeeds] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
GOLD BOOLEAN | ||
______________________________________________________ | ||
greaterThanOrEquals | hasSeeds | ||
greaterThan | hasWheat | ||
lessThan | hasGrain | ||
lessThanOrEquals | | ||
_____________________|________________________________ | ||
|
||
Eg: [If gold greaterThanOrEquals 10 do buySeeds] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
GOLD BOOLEAN | ||
______________________________________________________ | ||
greaterThanOrEquals | hasSeeds | ||
greaterThan | hasWheat | ||
lessThan | hasGrain | ||
lessThanOrEquals | | ||
_____________________|________________________________ | ||
|
||
Eg: [If gold greaterThanOrEquals 10 do buySeeds] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
|__________________|___________________________| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
|__________________|___________________________| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
|__________________|___________________________| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
|__________________|___________________________| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
| Grain | 15 gold | | ||
|__________________|___________________________| | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
| Grain | 15 gold | | ||
|__________________|___________________________| | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.______________________________________________. | ||
| Market Rates | | ||
|----------------------------------------------| | ||
| Item | Selling or Buying Price | | ||
|------------------|---------------------------| | ||
| Seeds | 10 gold | | ||
| Grain | 15 gold | | ||
| Chicken | 25 gold | | ||
| Eggs | 10 gold | | ||
|__________________|___________________________| |