package mafiaserver;

import java.net.Socket;

/**
 * Participant.java
 * Contains the Participant class
 * @author Cory Gehr (cmg5573)
 */
abstract class Participant {
    
    protected String username = "(UNKNOWN)";   // Username
    private boolean canTalk = true;            // Tells if user can chat
    private boolean canVote = false;           // Tells if user can vote
    private boolean canSeeChat = true;         // Tells if user can see chats
    private boolean isAlive = true;            // Tells if user is alive/active
    
    /**
     * getUsername()
     * Gets the participant's username
     * @return Username of this Participant
     */
    public String getUsername() {
        return this.username;
    }
   
    /**
     * canSeeChat()
     * Tells if the user can receive chat messages
     * @returns True if Yes, False if No
     */
    public boolean canSeeChat() {
        return this.canSeeChat || !this.isAlive;
    }
    
    /**
     * canTalk()
     * Tells if the user can send messages
     * @returns True if Yes, False if No
     */
    public boolean canTalk() {
        return this.canTalk && this.isAlive;
    }
    
    /**
     * canVote()
     * Tells if the user can vote
     * @returns True if Yes, False if No
     */
    public boolean canVote() {
        return this.canVote && this.isAlive;
    }
    
    /**
     * getInput()
     * Gets data from the client
     * @return Input from Client
     */
    abstract public String getInput();
    
    /**
     * pushOutput()
     * Pushes data to the client
     * @param input Message to send
     */
    abstract public void pushOutput(String input);
}

@@ -1350,32 +1350,1072 @@
  %7D%0A    %0A    /**%0A
+     * changeSeeChatStatus()%0A     * Changes the user's ability to receive chats%0A     * @param status True if they can see chats, False if not%0A     */%0A    public void changeSeeChatStatus(boolean status) %7B%0A        this.canSeeChat = status;%0A    %7D%0A    %0A    /**%0A     * changeTalkStatus()%0A     * Changes the user's ability to talk%0A     * @param status True if they can talk, False if not%0A     */%0A    public void changeTalkStatus(boolean status) %7B%0A        this.canTalk = status;%0A    %7D%0A    %0A    /**%0A     * changeVoteStatus()%0A     * Changes the user's ability to vote%0A     * @param status True if they can vote, False if not%0A     */%0A    public void changeVoteStatus(boolean status) %7B%0A        this.canVote = status;%0A    %7D%0A    %0A    /**%0A     * deactivate()%0A     * Deactivates the user%0A     */%0A    public void deactivate() %7B%0A        this.isAlive = false;%0A    %7D%0A    %0A    /**%0A     * isAlive()%0A     * Tells if the user is alive%0A     * @returns True if Yes, False if No%0A     */%0A    public boolean isAlive() %7B%0A        return this.isAlive;%0A    %7D%0A    %0A    /**%0A
      * getInput(

Add functions to view/change booleans