aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibaut Horel <thibaut.horel@gmail.com>2011-06-19 17:25:59 +0200
committerThibaut Horel <thibaut.horel@gmail.com>2011-06-19 17:25:59 +0200
commit4f62d5ce18765a5f7376a508a45bdb021e5ca5b8 (patch)
tree49e8d4c2ac262f760f75422012b477a49a2b0511
parent338891c519fba83ccd6c61492082abfa2bb1cf22 (diff)
downloadicfp2011-4f62d5ce18765a5f7376a508a45bdb021e5ca5b8.tar.gz
Organise the directory so that it is compliant with the submission rules
-rw-r--r--README7
-rwxr-xr-xinstall2
-rw-r--r--src/Makefile (renamed from Makefile)2
-rw-r--r--src/game.ml (renamed from game.ml)5
-rw-r--r--src/ltg.ml (renamed from ltg.ml)6
5 files changed, 14 insertions, 8 deletions
diff --git a/README b/README
index 9986251..1381b1f 100644
--- a/README
+++ b/README
@@ -1,3 +1,10 @@
Team Alias:
* thrasibule
* zaran
+
+To compile:
+cd src
+make depend
+make
+
+This will create "run" in root directory
diff --git a/install b/install
new file mode 100755
index 0000000..039e4d0
--- /dev/null
+++ b/install
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 0
diff --git a/Makefile b/src/Makefile
index 98262de..da9657a 100644
--- a/Makefile
+++ b/src/Makefile
@@ -10,7 +10,7 @@ DEPEND=.depend
all: ltg.opt
ltg.opt: ltg.cmx
- $(OCAMLOPT) $(OCAMLFLAGS) -o ltg game.cmx ltg.cmx
+ $(OCAMLOPT) $(OCAMLFLAGS) -o ../run game.cmx ltg.cmx
clean:
rm -f *.cm? *.cmx? *.o *~
diff --git a/game.ml b/src/game.ml
index 0258e28..f25240f 100644
--- a/game.ml
+++ b/src/game.ml
@@ -16,11 +16,10 @@ type slot = {
mutable vitality: int;
mutable field: lambda
}
-;;
let player0 = Array.init 256 (fun _ -> {vitality = 10000; field = id})
let player1 = Array.init 256 (fun _ -> {vitality = 10000; field = id})
-let card_count = ref(0)
+let card_count = ref 0
let proponent = ref player0
let opponent = ref player1
@@ -185,7 +184,6 @@ type card =
| Copy
| Revive
| Zombie
-;;
let card_of_string s = match s with
| "I" -> I
@@ -204,7 +202,6 @@ let card_of_string s = match s with
| "revive" -> Revive
| "zombie" -> Zombie
| _ -> raise( Rule_error "not a valid card name")
-;;
let cardfun_of_card c = match c with
| I -> id
diff --git a/ltg.ml b/src/ltg.ml
index 1b7c329..c3b7637 100644
--- a/ltg.ml
+++ b/src/ltg.ml
@@ -22,11 +22,11 @@ let read_move () = Scanf.scanf "%d\n" (fun d -> match d with
(* important print newline to flush output *)
let play_move () =
- Printf.printf "1";
+ Printf.printf "2";
print_newline ();
- Printf.printf "I";
- print_newline();
Printf.printf "1";
+ print_newline();
+ Printf.printf "zero";
print_newline ()
let automatic player =