PotatoPlan/Tractor_VS/Game1/Sources/smartTractor.cs

47 lines
858 B
C#
Raw Normal View History

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;
}
}