Commit 0fe4a9e0 authored by jak.moore's avatar jak.moore

fixing stuff

parent 4891ca32
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
File added
......@@ -6,6 +6,6 @@ public enum Actions {
WOLF_LEFT_TO_BOAT, WOLF_RIGHT_TO_BOAT,
WOLF_BOAT_TO_LEFT, WOLF_BOAT_TO_RIGHT,
CHICKEN_RIGHT_TO_BOAT, CHICKEN_LEFT_TO_BOAT,
CHICKEN_BOAT_TO_RIGHT, CHICKEN_BOAT_TO_LEFT,
CHICKEN_BOAT_TO_RIGHT, CHICKEN_BOAT_TO_LEFT
}
......@@ -10,11 +10,11 @@ public class GameState {
public boolean isRaftOnLeftBank;
// Constructor for GameState class
public GameState(ArrayList<Integer> left, ArrayList<Integer> right, ArrayList<Integer> raft, boolean raftBank) {
public GameState(ArrayList<Integer> left, ArrayList<Integer> right, ArrayList<Integer> raftContents, boolean raftBank) {
leftBank = left;
rightBank = right;
this.raft = raft;
raft = raftContents;
isRaftOnLeftBank = raftBank;
}
......
......@@ -7,10 +7,13 @@ public class Main {
public static void main(String[] args) {
// Starting game state
@SuppressWarnings("unchecked")
ArrayList<Integer> lBank = new ArrayList() {
};
@SuppressWarnings("unchecked")
ArrayList<Integer> rBank = new ArrayList() {
};
@SuppressWarnings("unchecked")
ArrayList<Integer> raft = new ArrayList() {
};
......@@ -21,6 +24,7 @@ public class Main {
ArrayList<Actions> validActions = getActions(gs);
// Array list to hold game states
@SuppressWarnings("unchecked")
ArrayList<GameState> newStates = new ArrayList();
// Iterate through valid actions simulating their game state
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment