Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include "token.h"
- void create(token *t, int value)
- {
- t->currentPosition = value;
- t->direction = 1;
- }
- void move(token *t, int value)
- {
- if (t->direction == 1)
- {
- t->currentPosition += value;
- }
- else
- {
- t->currentPosition -= value;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement