-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from UtkarshMe/issue_14
- Loading branch information
Showing
9 changed files
with
238 additions
and
185 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* include/action.h | ||
* Declare the interface to handle user input | ||
* include/command.c | ||
* Declare the interface for taking and executing commands | ||
* | ||
* Copyright (C) 2017 Utkarsh Mahshwari <[email protected]> | ||
* | ||
|
@@ -18,14 +18,23 @@ | |
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#ifndef ACTION_H_D9AS6ZWN | ||
#define ACTION_H_D9AS6ZWN | ||
#ifndef COMMAND_H_0TNF49V3 | ||
#define COMMAND_H_0TNF49V3 | ||
|
||
|
||
/** | ||
* Ask user for input and build the command | ||
* @return The pointer to the command | ||
*/ | ||
command_t * command_get(); | ||
|
||
|
||
/** | ||
* Take a key as input and update the map checking if the move is valid or not | ||
* @param The map to update | ||
* @return The command entered by the user | ||
* Execute the command on the given map | ||
* @param The pointer to the map | ||
* @patam The pointer to the command | ||
*/ | ||
command_t action_make_move(const map_t *map); | ||
void command_exec(const map_t *, const command_t *); | ||
|
||
|
||
#endif /* end of include guard: ACTION_H_D9AS6ZWN */ | ||
#endif /* end of include guard: COMMAND_H_0TNF49V3 */ |
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
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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.