Package Helper

Class Sauvgard


  • public class Sauvgard
    extends java.lang.Object
    The Sauvgard class represents a saved state in the game, including background colors, title, formatted date and time, and the identifier of the machine.
    Since:
    2023-12-01
    Version:
    1.0
    Author:
    Laamiri Ouail & Hajar Sadik
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String[][] backgroundColors
      2D array representing the background colors of the saved state.
      (package private) java.lang.String formattedDateTime
      The formatted date and time when the state was saved.
      (package private) byte machine
      The identifier of the machine associated with the saved state.
      (package private) java.lang.String title
      The title of the saved state.
    • Constructor Summary

      Constructors 
      Constructor Description
      Sauvgard​(java.lang.String[][] backgroundColors, java.lang.String title, java.lang.String formattedDateTime, byte machine)
      Constructs a Sauvgard object with the specified background colors, title, formatted date and time, and machine identifier.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String[][] getBackgroundColors()
      Gets the background colors of the saved state.
      java.lang.String getFormattedDateTime()
      Gets the formatted date and time when the state was saved.
      byte getMachine()
      Gets the identifier of the machine associated with the saved state.
      java.lang.String getTitle()
      Gets the title of the saved state.
      java.lang.String toString()
      Returns a string representation of the Sauvgard object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • backgroundColors

        java.lang.String[][] backgroundColors
        2D array representing the background colors of the saved state.
      • title

        java.lang.String title
        The title of the saved state.
      • formattedDateTime

        java.lang.String formattedDateTime
        The formatted date and time when the state was saved.
      • machine

        byte machine
        The identifier of the machine associated with the saved state.
    • Constructor Detail

      • Sauvgard

        public Sauvgard​(java.lang.String[][] backgroundColors,
                        java.lang.String title,
                        java.lang.String formattedDateTime,
                        byte machine)
        Constructs a Sauvgard object with the specified background colors, title, formatted date and time, and machine identifier.
        Parameters:
        backgroundColors - 2D array representing the background colors.
        title - The title of the saved state.
        formattedDateTime - The formatted date and time.
        machine - The identifier of the machine.
    • Method Detail

      • getBackgroundColors

        public java.lang.String[][] getBackgroundColors()
        Gets the background colors of the saved state.
        Returns:
        2D array representing the background colors.
      • getTitle

        public java.lang.String getTitle()
        Gets the title of the saved state.
        Returns:
        The title of the saved state.
      • getFormattedDateTime

        public java.lang.String getFormattedDateTime()
        Gets the formatted date and time when the state was saved.
        Returns:
        The formatted date and time.
      • getMachine

        public byte getMachine()
        Gets the identifier of the machine associated with the saved state.
        Returns:
        The identifier of the machine.
      • toString

        public java.lang.String toString()
        Returns a string representation of the Sauvgard object.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A string representation of the form "Sauvgard{title='title', formattedDateTime='formattedDateTime'}".