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
@LOOPSTART | |
CALLFF << @LOOK @EAST 2 | |
IFTGOTO << @PULLEAST | |
CALLFF << @LOOK @WEST 2 | |
IFTGOTO << @PULLWEST | |
CALLFF << @MOVE @SOUTH 2 | |
GOTO << @LOOPEND | |
@PULLEAST |
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
@LOOPSTART | |
GOTO << @PULLEAST | |
@PULLEAST | |
CALLFF << @LOOK @EAST 2 | |
DUP | |
EQUAL << @CELL_ROBOT | |
IFTGOTO << @PUNCHEAST | |
EQUAL << @CELL_RESOURCE | |
IFTGOTO << @EATEAST |
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
@LOOPSTART | |
CALL << @CHECKALL | |
CALL << @MOVEEAST | |
CALL << @CHECKALL | |
CALL << @MOVENORTH | |
GOTO << @LOOPSTART | |
@CHECKALL | |
CALL << @CHECKEAST | |
CALL << @CHECKNORTH |
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
@LOOPSTART | |
GOTO << @CHECKEAST | |
@MOVEEAST | |
CALLFF << @LOOK @EAST 2 | |
EQUAL << @CELL_EMPTY | |
IFFCALL << @MOVENORTH | |
CALLFF << @MOVE @EAST 2 | |
POP | |
RETURN |
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
@LOOPSTART | |
GOTO << @CHECKEAST | |
@MOVEEAST | |
CALLFF << @LOOK @EAST 2 | |
EQUAL << @CELL_EMPTY | |
IFFCALL << @MOVENORTH | |
CALLFF << @MOVE @EAST 2 | |
POP | |
RETURN |
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
@LOOPSTART | |
GOTO << @NORTHANDWESTGETOUT | |
GOTO << @LOOPSTART | |
@NORTHANDWESTGETOUT | |
CALLFF << @LOOK @NORTH 2 | |
EQUAL << @CELL_EMPTY | |
IFFGOTO << @MOVEWESTGETOUT | |
CALLFF << @MOVE @NORTH 2 | |
POP |
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
Server started: | |
postgres@shruti-Inspiron-N5010:/home/shruti/git_stuff/grails_stuff$ /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data | |
LOG: database system was shut down at 2013-01-29 15:46:28 MST | |
LOG: database system is ready to accept connections | |
LOG: autovacuum launcher started | |
----------------------------------------------------------------------------------------------------------------------- | |
Client connection error | |
postgres@shruti-Inspiron-N5010:~$ createdb mydb |
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
postgres 3390 0.0 0.0 5720 1488 pts/1 S 11:34 0:00 su postgres | |
postgres 3398 0.0 0.0 5780 1900 pts/1 S 11:34 0:00 bash | |
postgres 6019 0.0 0.1 39916 5144 pts/1 S+ 15:46 0:00 /usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data | |
postgres 6021 0.0 0.0 39916 816 ? Ss 15:46 0:00 postgres: checkpointer process | |
postgres 6022 0.0 0.0 39916 828 ? Ss 15:46 0:00 postgres: writer process | |
postgres 6023 0.0 0.0 39916 832 ? Ss 15:46 0:00 postgres: wal writer process | |
postgres 6024 0.0 0.0 40452 1756 ? Ss 15:46 0:00 postgres: autovacuum launcher process | |
postgres 6025 0.0 0.0 10140 836 ? Ss 15:46 0:00 postgres: stats collector process | |
postgres 6222 0.0 0.0 5720 1484 pts/2 S 16:03 0:00 su - postgres | |
postgres 6230 0.0 0.1 7952 4148 pts/2 S 16:03 0:00 -su |
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
def tourney(N, C): | |
game_set = [] | |
for i in range(1, N): #add error check for 1 player | |
for j in range(i+1, N+1): | |
game_set.append(str(i) + " vs " + str(j)) | |
for game in game_set: | |
print game | |
tourney(6,4) |
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
def tourney(N, C): | |
if N < 2 or C < 1: | |
print "Enter >2 N and >0 C" | |
sys.exit() | |
#generate game set | |
game_set = [] | |
for i in range(1, N): | |
for j in range(i+1, N+1): | |
game_set.append(str(i) + " vs " + str(j)) |