Murilo Pereira
9ecf0acec8
s/start/begin
2011-05-09 00:38:31 -03:00
Murilo Pereira
ea9ff3cfb5
No return on end of void functions.
2011-05-08 16:58:18 -03:00
Murilo Pereira
854184c2fd
stack#push and stack#pop less destructive.
2011-05-01 05:36:46 -03:00
Murilo Pereira
5d96d20893
Move dup functions to lib.
2011-05-01 03:06:43 -03:00
Murilo Pereira
0a37b5982a
Really, don't change the stack when calling stack#reverse.
2011-05-01 02:04:16 -03:00
Murilo Pereira
0e0c44f5c6
Non-destructive stack#reverse.
2011-05-01 01:13:15 -03:00
Murilo Pereira
5a62ecb955
Added stack#reverse.
2011-04-30 22:13:41 -03:00
Murilo Pereira
3420045a35
Refactored 'length(stack)' and added test.
2011-02-16 22:42:49 -02:00
Murilo Pereira
b1000cfb55
Moving game logic to the game object.
2011-02-16 22:27:00 -02:00
Murilo Pereira
417a8ca2b7
s/delete/free/g
2011-02-14 00:10:47 -02:00
Murilo Pereira
777434177f
Added tests for the stack and made them pass.
...
* Make 'empty(stack)' more robust
* Only try to 'push(stack, card)' if card != NULL
* Added message explaining why 'pop(stack)' needs to create a new
stack object when popping a stack's last element
* 'move_card(stack, stack)' now checks if the origin pops something
before trying to 'push(stack)' to destination. This prevents
dereferencing a possible NULL pointer.
2011-02-13 23:13:16 -02:00
Murilo Pereira
dea468e8be
No need for stdbool.h.
2011-02-13 19:37:50 -02:00
Murilo Pereira
fcece2b7ac
Add initial unit tests.
2011-02-06 23:33:44 -02:00
Murilo Soares Pereira
b754c0a71e
Added the a debug function to print the values of the structures.
2010-04-22 01:51:27 -03:00
Murilo Soares Pereira
2c06189b6c
Added the initial test files.
2010-04-22 01:50:32 -03:00