Class BitSetAction

  • All Implemented Interfaces:
    IAction, java.lang.Comparable<IAction>

    public class BitSetAction
    extends java.lang.Object
    implements IAction
    This Class represents an action in a game.
    Author:
    Alessandro Buldini, Alessandro Pomponio, Federico Zanini
    • Constructor Summary

      Constructors 
      Constructor Description
      BitSetAction​(java.lang.String from, java.lang.String to, it.unibo.ai.didattica.competition.tablut.domain.State.Turn turn)
      Constructor for the BitSetAction Class
      BitSetAction​(java.lang.String from, java.lang.String to, it.unibo.ai.didattica.competition.tablut.domain.State.Turn turn, int value)
      Constructor for BitSetAction Class
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compareTo​(IAction o)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getFrom()
      Accesses the private field from
      java.lang.String getTo()
      Accesses the private field to
      it.unibo.ai.didattica.competition.tablut.domain.State.Turn getTurn()
      Accesses the private field turn
      int getValue()
      Accesses the private field value
      int hashCode()  
      void setValue​(int value)
      Sets the value of the private field value
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • BitSetAction

        public BitSetAction​(java.lang.String from,
                            java.lang.String to,
                            it.unibo.ai.didattica.competition.tablut.domain.State.Turn turn)
        Constructor for the BitSetAction Class
        Parameters:
        from - the starting position
        to - the final position
        turn - the current turn
        See Also:
        State.Turn
      • BitSetAction

        public BitSetAction​(java.lang.String from,
                            java.lang.String to,
                            it.unibo.ai.didattica.competition.tablut.domain.State.Turn turn,
                            int value)
        Constructor for BitSetAction Class
        Parameters:
        from - the starting position
        to - the final position
        turn - the current turn
        value - the heuristic value
        See Also:
        State.Turn
    • Method Detail

      • getFrom

        public java.lang.String getFrom()
        Accesses the private field from
        Specified by:
        getFrom in interface IAction
        Returns:
        Value of from
      • getTo

        public java.lang.String getTo()
        Accesses the private field to
        Specified by:
        getTo in interface IAction
        Returns:
        Value of to
      • getTurn

        public it.unibo.ai.didattica.competition.tablut.domain.State.Turn getTurn()
        Accesses the private field turn
        Specified by:
        getTurn in interface IAction
        Returns:
        Value of turn
      • getValue

        public int getValue()
        Accesses the private field value
        Specified by:
        getValue in interface IAction
        Returns:
        Value of value
      • setValue

        public void setValue​(int value)
        Sets the value of the private field value
        Specified by:
        setValue in interface IAction
        Parameters:
        value - is an Integer data type
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • compareTo

        public int compareTo​(IAction o)
        Specified by:
        compareTo in interface java.lang.Comparable<IAction>