Skip to content

Commit

Permalink
[update] minor updates to the makefile, and documenting hello_grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Barbin committed Mar 28, 2011
1 parent e4bbebe commit eaacc4d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
17 changes: 10 additions & 7 deletions Makefile
@@ -1,26 +1,29 @@
# Tictactopa. (c) MLstate - 2010
# Tictactopa. (c) MLstate - 2010-2011
# @author Mathieu Barbin

.PHONY: doc

OPA=opa.exe

tictactopa=tictactopa.opack
opack=tictactopa.opack
conf=tictactopa.conf

all: tictactopa.exe
tictactopa=$(opack) $(conf)

# for compiling under emacs, like an ide for poor
loop:
while [ 1 ] ; do make -B all || true ; sleep 5 ; done
all: tictactopa.exe

tictactopa.exe:
$(OPA) $(OPAOPT) $(tictactopa) -o tictactopa.exe

hello_grid.exe:
$(OPA) $(OPAOPT) src/hello_grid.opa -o hello_grid.exe

doc:
$(OPA) $(OPAOPT) $(tictactopa) --generate-interface
opadoc.exe src multitub

clean:
rm -rf *.opx
rm tictactopa.exe
rm -f *.exe
rm -rf _build _tracks
rm -f *.log
14 changes: 12 additions & 2 deletions hello_grid.opa → src/hello_grid.opa
@@ -1,6 +1,14 @@
/*
* Tictactopa. (c) MLstate - 2011
* @author Mathieu Barbin
**/

/**
* Global properties for setting the grid
* This is a test program to show the client manipulation
* of the game grid. It contains the global properties for
* setting the grid, and uses the resources of the game.
*/

// global_margin = 20
// size_token = 83
// box_token=97
Expand All @@ -13,7 +21,8 @@
// y = global_margin + margin_y_token + (6 - line) * box_token
// column
// x = global_margin + margin_x_token + (column - 1) * box_token
// But this is better so :
// But this fits better so :

absolute_token_x =
| 1 -> 44
| 2 -> 140
Expand All @@ -22,6 +31,7 @@ absolute_token_x =
| 5 -> 430
| 6 -> 527
| 7 -> 624

absolute_token_y =
| 1 -> 527
| 2 -> 430
Expand Down

0 comments on commit eaacc4d

Please sign in to comment.