Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2004:
[Freeciv-Dev] (PR#9446) puppeteer commands and client game state
Home

[Freeciv-Dev] (PR#9446) puppeteer commands and client game state

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#9446) puppeteer commands and client game state
From: "Guillermo Lopez Alejos" <100030179@xxxxxxxxxxxxxxx>
Date: Thu, 22 Jul 2004 06:40:35 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9446 >

I think that puppeteer commands shall be divided into categories (the
command "move" has no sense in pre game state).

The solution could be a new layer between the parser and puppeteer's
functions. This layer could check if the issued command is appropiate
for the current game state.

The bison grammar will contain references to the check function (i.e.
puppet_check_game_state (command_id, ...) (the "..." are a variable
number of arguments)), then puppet_check_game_state() will query for the
client's game state and check if the issued comand is valid. If so,
puppet_check_game_state() will recover the correct number of arguments
from the va_arg list and call the appropiate exec_*() function.

How to resolve that "command_id" easily with bison?

--
Guillermo López Alejos - N.I.A. 100030179
Universidad Carlos III de Madrid
Ingeniería Técnica en Informática de Gestión









[Prev in Thread] Current Thread [Next in Thread]