20 lines
435 B
C#
20 lines
435 B
C#
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
|
|
|
|
// áîò ïðîñòî ñòðåëÿåò íàóãàä
|
|
|
|
public class EasyBotAI : IBotAI
|
|
{
|
|
public Vector2Int MakeMove(GamePole pole)
|
|
{
|
|
var shots = pole.GetAvailableShots();
|
|
if (shots.Count == 0)
|
|
return new Vector2Int(-1, -1); // ñèãíàë, ÷òî ñòðåëÿòü íåêóäà
|
|
|
|
var shot = shots[Random.Range(0, shots.Count)];
|
|
return new Vector2Int(shot.x, shot.y);
|
|
}
|
|
|
|
}
|