<commit_before>/*******************************************************************************
 * Copyright (c) 2015 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package net.wasdev.gameon.mediator.room;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;

import net.wasdev.gameon.mediator.Constants;
import net.wasdev.gameon.mediator.Log;
import net.wasdev.gameon.mediator.MapClient;
import net.wasdev.gameon.mediator.PlayerClient;
import net.wasdev.gameon.mediator.PlayerConnectionMediator;
import net.wasdev.gameon.mediator.RoomMediator;
import net.wasdev.gameon.mediator.RoutedMessage;
import net.wasdev.gameon.mediator.models.ConnectionDetails;
import net.wasdev.gameon.mediator.models.Exit;
import net.wasdev.gameon.mediator.models.Exits;
import net.wasdev.gameon.mediator.models.Site;

/**
 *
 */
public class FirstRoom implements RoomMediator {

    public static final String TELEPORT = "teleport";
    public static final String FIRST_ROOM_DESC = "You've entered a vaguely squarish room, with walls of an indeterminate color.";
    public static final String FIRST_ROOM_EXTENDED = "\n\nYou are alone at the moment, and have a strong suspicion that "
            + " you're in a place that requires '/' before commands and is picky about syntax. You notice "
            + " buttons at the top right of the screen, and a button at the bottom left to help with that"
            + " leading slash.\n\nYou feel a strong temptation to try the buttons.";

    public static final String FIRST_ROOM_INV = "Sadly, there is nothing here.";

    public static final String FIRST_ROOM_POCKETS = "You do not appear to be carrying anything.";
    public static final String FIRST_ROOM_POCKETS_EXTENDED = "\n\nBut you will be eventually! As you explore, use /TAKE"
            + " to pick things up. Some things will remain with the room when you leave, others might stay"
            + " in your pocket for a little longer. Nothing is guaranteed to stay with you indefinitely. "
            + " Sneaky characters and self-healing rooms will foil most hoarder's plans.";

    PlayerConnectionMediator session = null;
    private AtomicInteger counter = new AtomicInteger(0);
    boolean newbie = false;
    boolean inventory = false;

    MapClient mapClient = null;

    final String playerJwt;
    final PlayerClient playerClient;

    public FirstRoom(String playerJwt, PlayerClient playerClient, MapClient mapClient) {
        this(playerJwt, playerClient, mapClient, false);
    }

    public FirstRoom(String playerJwt, PlayerClient playerClient, MapClient mapClient, boolean newbie) {
        Log.log(Level.FINEST, this, "New First Room, new player {0}", newbie);
        this.newbie = newbie;
        this.mapClient = mapClient;
        this.playerJwt = playerJwt;
        this.playerClient = playerClient;
    }

    @Override
    public String getId() {
        return Constants.FIRST_ROOM;
    }

    @Override
    public String getName() {<commit_msg>Update initial greeting from First Room.<commit_after>/*******************************************************************************
 * Copyright (c) 2015 IBM Corp.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package net.wasdev.gameon.mediator.room;

import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.logging.Level;

import javax.json.Json;
import javax.json.JsonObject;
import javax.json.JsonObjectBuilder;

import net.wasdev.gameon.mediator.Constants;
import net.wasdev.gameon.mediator.Log;
import net.wasdev.gameon.mediator.MapClient;
import net.wasdev.gameon.mediator.PlayerClient;
import net.wasdev.gameon.mediator.PlayerConnectionMediator;
import net.wasdev.gameon.mediator.RoomMediator;
import net.wasdev.gameon.mediator.RoutedMessage;
import net.wasdev.gameon.mediator.models.ConnectionDetails;
import net.wasdev.gameon.mediator.models.Exit;
import net.wasdev.gameon.mediator.models.Exits;
import net.wasdev.gameon.mediator.models.Site;

/**
 *
 */
public class FirstRoom implements RoomMediator {

    public static final String TELEPORT = "teleport";
    public static final String FIRST_ROOM_DESC = "You've entered a vaguely squarish room, with walls of an indeterminate color.";
    public static final String FIRST_ROOM_EXTENDED = "\n\nBRIEF README: \n\n"
            + "* Commands start with '/'\n"
            + "* `/help` will always list available commands. The list contents will change from room to room.\n"
            + "* `/exits` will always show the list of available exits.\n"
            + "* `/sos` will always return you to First Room\n";

    public static final String FIRST_ROOM_INV = "Sadly, there is nothing here.";

    public static final String FIRST_ROOM_POCKETS = "You do not appear to be carrying anything.";
    public static final String FIRST_ROOM_POCKETS_EXTENDED = "\n\nBut you might be eventually! Individual rooms "
            + " may or may not support the notion of items. So whether or not you have things in your pockets"
            + " will change from room to room, as will how long they stay there.";

    PlayerConnectionMediator session = null;
    private AtomicInteger counter = new AtomicInteger(0);
    boolean newbie = false;
    boolean inventory = false;

    MapClient mapClient = null;

    final String playerJwt;
    final PlayerClient playerClient;

    public FirstRoom(String playerJwt, PlayerClient playerClient, MapClient mapClient) {
        this(playerJwt, playerClient, mapClient, false);
    }

    public FirstRoom(String playerJwt, PlayerClient playerClient, MapClient mapClient, boolean newbie) {
        Log.log(Level.FINEST, this, "New First Room, new player {0}", newbie);
        this.newbie = newbie;
        this.mapClient = mapClient;
        this.playerJwt = playerJwt;
        this.playerClient = playerClient;
    }

    @Override
    public String getId() {
        return Constants.FIRST_ROOM;
    }

    @Override
    public String getName() {
{'fraction_non_alphanumeric': 0.1213618890719385, 'fraction_numerical': 0.0027457440966501922, 'mean_word_length': 3.783322390019698, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4443469', 'n_tokens_mistral': 2038, 'n_tokens_neox': 1934, 'n_words': 693}