<commit_before>// A unit group in the game. This may consist of a ship and any number of crew.

// DO NOT MODIFY THIS FILE
// Never try to directly create an instance of this class, or modify its member variables.
// Instead, you should only be reading its variables and calling its functions.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// <<-- Creer-Merge: usings -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
// you can add additional using(s) here
// <<-- /Creer-Merge: usings -->>

namespace Joueur.cs.Games.Pirates
{
    /// <summary>
    /// A unit group in the game. This may consist of a ship and any number of crew.
    /// </summary>
    public class Unit : Pirates.GameObject
    {
        #region Properties
        /// <summary>
        /// Whether this Unit has performed its action this turn.
        /// </summary>
        public bool Acted { get; protected set; }

        /// <summary>
        /// How many crew are on this Tile. This number will always be &lt;= crewHealth.
        /// </summary>
        public int Crew { get; protected set; }

        /// <summary>
        /// How much total health the crew on this Tile have.
        /// </summary>
        public int CrewHealth { get; protected set; }

        /// <summary>
        /// How much gold this Unit is carrying.
        /// </summary>
        public int Gold { get; protected set; }

        /// <summary>
        /// How many more times this Unit may move this turn.
        /// </summary>
        public int Moves { get; protected set; }

        /// <summary>
        /// The Player that owns and can control this Unit, or null if the Unit is neutral.
        /// </summary>
        public Pirates.Player Owner { get; protected set; }

        /// <summary>
        /// (Merchants only) The path this Unit will follow. The first element is the Tile this Unit will move to next.
        /// </summary>
        public Pirates.Tile Path { get; protected set; }

        /// <summary>
        /// If a ship is on this Tile, how much health it has remaining. 0 for no ship.
        /// </summary>
        public int ShipHealth { get; protected set; }

        /// <summary>
        /// (Merchants only) The Port this Unit is moving to.
        /// </summary>
        public Pirates.Port TargetPort { get; protected set; }

        /// <summary>
        /// The Tile this Unit is on.
        /// </summary>
        public Pirates.Tile Tile { get; protected set; }


        // <<-- Creer-Merge: properties -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
        // you can add additional properties(s) here. None of them will be tracked or updated by the server.
        // <<-- /Creer-Merge: properties -->>
        #endregion


        #region Methods
        /// <summary>
        /// Creates a new instance of Unit. Used during game initialization, do not call directly.
        /// </summary>
        protected Unit() : base()
        {
        }

        /// <summary>
        /// Attacks either crew, a ship, or a port on a Tile in range.
        /// </summary>
        /// <param name="tile">The Tile to attack.</param>
        /// <param name="target">Whether to attack 'crew', 'ship', or 'port'. Crew deal damage to crew, and ships deal damage to ships and ports. Consumes any remaining moves.</param>
        /// <returns>True if successfully attacked, false otherwise.</returns>
        public bool Attack(Pirates.Tile tile, string target)
        {
            return this.RunOnServer<bool>("attack", new Dictionary<string, object> {<commit_msg>(Creer) Changed Unit.Path to IList<Tile><commit_after>// A unit group in the game. This may consist of a ship and any number of crew.

// DO NOT MODIFY THIS FILE
// Never try to directly create an instance of this class, or modify its member variables.
// Instead, you should only be reading its variables and calling its functions.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// <<-- Creer-Merge: usings -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
// you can add additional using(s) here
// <<-- /Creer-Merge: usings -->>

namespace Joueur.cs.Games.Pirates
{
    /// <summary>
    /// A unit group in the game. This may consist of a ship and any number of crew.
    /// </summary>
    public class Unit : Pirates.GameObject
    {
        #region Properties
        /// <summary>
        /// Whether this Unit has performed its action this turn.
        /// </summary>
        public bool Acted { get; protected set; }

        /// <summary>
        /// How many crew are on this Tile. This number will always be &lt;= crewHealth.
        /// </summary>
        public int Crew { get; protected set; }

        /// <summary>
        /// How much total health the crew on this Tile have.
        /// </summary>
        public int CrewHealth { get; protected set; }

        /// <summary>
        /// How much gold this Unit is carrying.
        /// </summary>
        public int Gold { get; protected set; }

        /// <summary>
        /// How many more times this Unit may move this turn.
        /// </summary>
        public int Moves { get; protected set; }

        /// <summary>
        /// The Player that owns and can control this Unit, or null if the Unit is neutral.
        /// </summary>
        public Pirates.Player Owner { get; protected set; }

        /// <summary>
        /// (Merchants only) The path this Unit will follow. The first element is the Tile this Unit will move to next.
        /// </summary>
        public IList<Pirates.Tile> Path { get; protected set; }

        /// <summary>
        /// If a ship is on this Tile, how much health it has remaining. 0 for no ship.
        /// </summary>
        public int ShipHealth { get; protected set; }

        /// <summary>
        /// (Merchants only) The Port this Unit is moving to.
        /// </summary>
        public Pirates.Port TargetPort { get; protected set; }

        /// <summary>
        /// The Tile this Unit is on.
        /// </summary>
        public Pirates.Tile Tile { get; protected set; }


        // <<-- Creer-Merge: properties -->> - Code you add between this comment and the end comment will be preserved between Creer re-runs.
        // you can add additional properties(s) here. None of them will be tracked or updated by the server.
        // <<-- /Creer-Merge: properties -->>
        #endregion


        #region Methods
        /// <summary>
        /// Creates a new instance of Unit. Used during game initialization, do not call directly.
        /// </summary>
        protected Unit() : base()
        {
            this.Path = new List<Pirates.Tile>();
        }

        /// <summary>
        /// Attacks either crew, a ship, or a port on a Tile in range.
        /// </summary>
        /// <param name="tile">The Tile to attack.</param>
        /// <param name="target">Whether to attack 'crew', 'ship', or 'port'. Crew deal damage to crew, and ships deal damage to ships and ports. Consumes any remaining moves.</param>
        /// <returns>True if successfully attacked, false otherwise.</returns>
        public bool Attack(Pirates.Tile tile, string target)
        {
            return this.RunOnServer<bool>("attack", new Dictionary<string, object> {
{'fraction_non_alphanumeric': 0.11573454642761573, 'fraction_numerical': 0.0002675943270002676, 'mean_word_length': 1.8928018575851393, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 90, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5285221', 'n_tokens_mistral': 1978, 'n_tokens_neox': 1921, 'n_words': 867}