4d1b20b32f
First stable. RC_01
47 lines
858 B
C#
47 lines
858 B
C#
using System;
|
|
using Microsoft.Xna.Framework;
|
|
using System;
|
|
|
|
class SmartTractor
|
|
{
|
|
private Crops[,] crops;
|
|
private Vector2 housePos;
|
|
private Vector2 tractorPos;
|
|
private Vector2 Size;
|
|
private int tileSize;
|
|
private int Score;
|
|
private int Spacing;
|
|
private Random r = new Random();
|
|
|
|
|
|
|
|
public Vector2 returnChoice()
|
|
{
|
|
return new Vector2(r.Next(0, (int)Size.X), r.Next(0, (int)Size.Y)) * (tileSize + Spacing);
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void updateMap(Vector2 newTractorPos, Vector2 newHousePos, Crops[,] newCropsStatus, Vector2 newSize, int newTileSize, int newSpacing, int newScore)
|
|
{
|
|
crops = newCropsStatus;
|
|
housePos = newHousePos;
|
|
tractorPos = newTractorPos;
|
|
Size = newSize;
|
|
tileSize = newTileSize;
|
|
Spacing = newSpacing;
|
|
Score = newScore;
|
|
}
|
|
}
|