PotatoPlan/Tractor_VS/Game1/Sources/smartTractor.cs
BOTLester 4d1b20b32f done by hand, but works eh.
First stable. RC_01
2020-04-08 20:04:31 +02:00

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