[gnome-games] gnect,gnobots2: remove unused variables
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] gnect,gnobots2: remove unused variables
- Date: Mon, 22 Aug 2011 22:10:39 +0000 (UTC)
commit d25b431a9a9e34c0e616e5518adad9ba98b8bbfa
Author: Thomas Hindoe Paaboel Andersen <phomes gmail com>
Date: Tue Aug 23 00:10:33 2011 +0200
gnect,gnobots2: remove unused variables
gnect/src/ia_main.c | 3 +--
gnobots2/game.c | 9 +--------
2 files changed, 2 insertions(+), 10 deletions(-)
---
diff --git a/gnect/src/ia_main.c b/gnect/src/ia_main.c
index 34f80eb..fe1ee1a 100644
--- a/gnect/src/ia_main.c
+++ b/gnect/src/ia_main.c
@@ -759,7 +759,7 @@ look_ahed (struct board *board)
{
long def_nodes = 0L;
short x, y, score[BOARDX], sc = IMPOSSIBLE, p;
- short depth = DEPTH, oracle, set = NO, def_depth = 0, cpu_level;
+ short depth = DEPTH, oracle, def_depth = 0, cpu_level;
maxdepth = 0;
@@ -798,7 +798,6 @@ look_ahed (struct board *board)
score[x] += (oracle << 13);
if (oracle) {
- set = YES;
if (!board->oracle[2 - board->turn]) {
board->lastguess = board->filled + 1;
board->oracle[2 - board->turn] = YES;
diff --git a/gnobots2/game.c b/gnobots2/game.c
index 171c894..94bba80 100644
--- a/gnobots2/game.c
+++ b/gnobots2/game.c
@@ -1105,15 +1105,11 @@ safe_teleport_available (void)
static gboolean
player_move (gint dx, gint dy)
{
- gint opx, opy;
gint nx, ny;
nx = player_xpos + dx;
ny = player_ypos + dy;
- opx = player_xpos;
- opy = player_ypos;
-
if (properties_safe_moves ()) {
if (!try_player_move (dx, dy)) {
play_sound (SOUND_BAD);
@@ -1226,7 +1222,7 @@ random_teleport (void)
static gboolean
safe_teleport (void)
{
- gint xp, yp, ixp, iyp;
+ gint xp, yp;
gint i, j;
if (!safe_teleport_available ()) {
@@ -1248,9 +1244,6 @@ safe_teleport (void)
}
}
- ixp = xp = rand () % GAME_WIDTH;
- iyp = yp = rand () % GAME_HEIGHT;
-
while (1) {
if ((temp_arena[xp][yp] == OBJECT_NONE) && check_safe (xp, yp)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]