aboutsummaryrefslogtreecommitdiff
path: root/projects/10/Square/SquareGame.ast
diff options
context:
space:
mode:
authorYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
committerYuchen Pei <me@ypei.me>2018-01-20 15:41:49 +0100
commitd3a0cc3a8ba6dfeb64d3faeffdeb6845b60e5840 (patch)
treed58df9ec2480e2a9ec6240f9c797f83d1a0b1056 /projects/10/Square/SquareGame.ast
parent3571f998b28fbc8d9250ba04c983935f10a16c15 (diff)
rearranged the dir for github
- removed tools and pdfs - rearranged the projects dirs - added md files - other minor changes
Diffstat (limited to 'projects/10/Square/SquareGame.ast')
-rw-r--r--projects/10/Square/SquareGame.ast1
1 files changed, 0 insertions, 1 deletions
diff --git a/projects/10/Square/SquareGame.ast b/projects/10/Square/SquareGame.ast
deleted file mode 100644
index 55a9ff0..0000000
--- a/projects/10/Square/SquareGame.ast
+++ /dev/null
@@ -1 +0,0 @@
-Right (JClass "SquareGame" [JClassVarDec "field" ("Square","square"),JClassVarDec "field" ("int","direction")] [JSubroutineDec (JSubroutineHeader "constructor" ("SquareGame","new") []) (JSubroutineBody [] [JLetStatment (JVarId "square" Nothing) (JExpCall (JSubroutineCall "Square" (Just "new") [JIntConst 0,JIntConst 0,JIntConst 30])),JLetStatment (JVarId "direction" Nothing) (JIntConst 0),JReturnStatement (Just (JKeywordConst "this"))]),JSubroutineDec (JSubroutineHeader "method" ("void","dispose") []) (JSubroutineBody [] [JDoStatement (JSubroutineCall "square" (Just "dispose") []),JDoStatement (JSubroutineCall "Memory" (Just "deAlloc") [JKeywordConst "this"]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","moveSquare") []) (JSubroutineBody [] [JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 1)]) [JDoStatement (JSubroutineCall "square" (Just "moveUp") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 2)]) [JDoStatement (JSubroutineCall "square" (Just "moveDown") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 3)]) [JDoStatement (JSubroutineCall "square" (Just "moveLeft") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "direction" Nothing)) [('=',JIntConst 4)]) [JDoStatement (JSubroutineCall "square" (Just "moveRight") [])] Nothing,JDoStatement (JSubroutineCall "Sys" (Just "wait") [JIntConst 5]),JReturnStatement Nothing]),JSubroutineDec (JSubroutineHeader "method" ("void","run") []) (JSubroutineBody [("char","key"),("boolean","exit")] [JLetStatment (JVarId "exit" Nothing) (JKeywordConst "false"),JWhileStatment (JExpUna '~' (JExpVar (JVarId "exit" Nothing))) [JWhileStatment (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 0)]) [JLetStatment (JVarId "key" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "keyPressed") [])),JDoStatement (JSubroutineCall "moveSquare" Nothing [])],JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 81)]) [JLetStatment (JVarId "exit" Nothing) (JKeywordConst "true")] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 90)]) [JDoStatement (JSubroutineCall "square" (Just "decSize") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 88)]) [JDoStatement (JSubroutineCall "square" (Just "incSize") [])] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 131)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 1)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 133)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 2)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 130)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 3)] Nothing,JIfStatement (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 132)]) [JLetStatment (JVarId "direction" Nothing) (JIntConst 4)] Nothing,JWhileStatment (JExpUna '~' (JExpBin (JExpVar (JVarId "key" Nothing)) [('=',JIntConst 0)])) [JLetStatment (JVarId "key" Nothing) (JExpCall (JSubroutineCall "Keyboard" (Just "keyPressed") [])),JDoStatement (JSubroutineCall "moveSquare" Nothing [])]],JReturnStatement Nothing])]) \ No newline at end of file