~ubuntu-branches/ubuntu/trusty/lordsawar/trusty

« back to all changes in this revision

Viewing changes to src/AI_Allocation.h

  • Committer: Bazaar Package Importer
  • Author(s): Barry deFreese
  • Date: 2008-06-17 16:07:00 UTC
  • mto: (5.1.1 lenny) (1.1.5 upstream)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20080617160700-6d8ofoz0qkasxlnw
ImportĀ upstreamĀ versionĀ 0.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (C) 2004 John Farrell
 
2
// Copyright (C) 2004, 2005, 2006 Ulf Lorenz
 
3
//
1
4
//  This program is free software; you can redistribute it and/or modify
2
5
//  it under the terms of the GNU General Public License as published by
3
6
//  the Free Software Foundation; either version 2 of the License, or
10
13
//
11
14
//  You should have received a copy of the GNU General Public License
12
15
//  along with this program; if not, write to the Free Software
13
 
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
16
//  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 
 
17
//  02110-1301, USA.
14
18
 
15
19
#ifndef AI_ALLOCATION_H
16
20
#define AI_ALLOCATION_H
66
70
        int allocateStacksToThreats();
67
71
        
68
72
        // stack return to a safe city
69
 
        MoveResult *stackReinforce(Stack *s);
 
73
        bool stackReinforce(Stack *s);
70
74
        
71
75
        // search a ruin
72
76
        void searchRuin(Stack *stack, Ruin *ruin);
73
77
        
74
78
        // move armies within a city to try to make full stacks
75
 
        MoveResult *shuffleStacksWithinCity(City *city, Stack *stack);
 
79
        bool shuffleStacksWithinCity(City *city, Stack *stack, 
 
80
                                     Vector<int> diff);
76
81
        
77
82
        // tell the stack to move to the point
78
83
        MoveResult *moveStack(Stack *stack, Vector<int> pos);
82
87
        
83
88
        // find the closest stack to the given position, but 0 if none within
84
89
        // limitInMoves (estimate of a maximum number of turns for getting there) 
85
 
        Stack *findClosestStack(Vector<int> pos, int limitInMoves);
 
90
        Stack *findClosestStackToCity(City *city, int limitInMoves);
86
91
        
87
92
        // find a position in the city that a stack can move to
88
 
        Vector<int> *getFreeSpotInCity(City *city, int stackSize);
 
93
        Vector<int> getFreeSpotInCity(City *city, int stackSize);
89
94
        
90
95
        // move stacks that we have no particular use for
91
96
        int defaultStackMovements();