Main Page Data Structures File List Globals
output_move.c File ReferenceOutputs a move message to the Core module.
More...
#include "white_interface.h"
#include "e:\AndrewWorkspace\Stratego\input.h"
Go to the source code of this file.
Detailed Description
Outputs a move message to the Core module.
This block receives a player number from the Lobby module at the start of the game. It uses this to create a move message (which contains its player number) whenever it receives a temp_move message from the process_input block. The move message is then sent to the game core.
Definition in file output_move.c.
Function Documentation
|
VCC Init function.
This function runs when the VCC simulation is first started.
Definition at line 38 of file output_move.c.
|
|
VCC Run function.
This runs each time a message arrives at the output_move block's player or in port.
Definition at line 47 of file output_move.c.
References player_no.
00048 {
00049 temp_move input;
00050 move output;
00051
00052
00053
00054
00055 if (player_Enabled())
00056 player_no = player_Value();
00057
00058
00059
00060
00061
00062 if (in_Enabled())
00063 {
00064 input = *in_Value();
00065
00066 output.player = player_no;
00067 output.x1 = input.start_x;
00068 output.y1 = input.start_y;
00069 output.x2 = input.end_x;
00070 output.y2 = input.end_y;
00071
00072 out_Post(&output);
00073 }
00074 }
|
Variable Documentation
|
Stores the player number that is supplied by the lobby module at the start of the game.
Definition at line 31 of file output_move.c.
Referenced by poin_entry_Run. |
|