Reformatted some files

This commit is contained in:
Gianlu 2020-05-25 15:55:06 +02:00
parent d051817dfa
commit fefd9022a8
8 changed files with 1383 additions and 1430 deletions

View File

@ -1,16 +1,16 @@
/**
* Copyright (c) 2012-2018, Andy Janata
* All rights reserved.
*
* <p>
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* <p>
* * Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
* and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
* <p>
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@ -25,9 +25,7 @@ package net.socialgamer.cah.customsets;
import net.socialgamer.cah.data.BlackCard;
public class CustomBlackCard extends BlackCard {
private final int id;
private final String text;
private final int draw;

View File

@ -31,9 +31,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
public final class CustomCardFormatHelper {
private CustomCardFormatHelper() {
}

View File

@ -1,16 +1,16 @@
/**
* Copyright (c) 2012-2018, Andy Janata
* All rights reserved.
*
* <p>
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* <p>
* * Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
* and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
* <p>
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@ -23,11 +23,11 @@
package net.socialgamer.cah.customsets;
import net.socialgamer.cah.data.CardSet;
import java.util.HashSet;
import java.util.Set;
import net.socialgamer.cah.data.CardSet;
public class CustomDeck extends CardSet {
private final int id;

View File

@ -1,16 +1,16 @@
/**
* Copyright (c) 2012-2018, Andy Janata
* All rights reserved.
*
* <p>
* Redistribution and use in source and binary forms, with or without modification, are permitted
* provided that the following conditions are met:
*
* <p>
* * Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer.
* and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* conditions and the following disclaimer in the documentation and/or other materials provided
* with the distribution.
* <p>
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
@ -25,9 +25,7 @@ package net.socialgamer.cah.customsets;
import net.socialgamer.cah.data.WhiteCard;
public class CustomWhiteCard extends WhiteCard {
private final int id;
private final String text;
private final String watermark;

File diff suppressed because it is too large Load Diff

View File

@ -22,14 +22,14 @@ public class AddCardsetHandler extends GameWithPlayerHandler {
@Inject
public AddCardsetHandler(final GameManager gameManager,
final CustomCardsService customCardsService) {
final CustomCardsService customCardsService) {
super(gameManager);
this.customCardsService = customCardsService;
}
@Override
public Map<ReturnableData, Object> handleWithUserInGame(final RequestWrapper request,
final HttpSession session, final User user, final Game game) {
final HttpSession session, final User user, final Game game) {
final Map<ReturnableData, Object> data = new HashMap<ReturnableData, Object>();
if (game.getHost() != user) {

View File

@ -1,25 +1,19 @@
package net.socialgamer.cah.handlers;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpSession;
import net.socialgamer.cah.Constants.AjaxOperation;
import net.socialgamer.cah.Constants.AjaxResponse;
import net.socialgamer.cah.Constants.CardSetData;
import net.socialgamer.cah.Constants.ErrorCode;
import net.socialgamer.cah.Constants.ReturnableData;
import com.google.inject.Inject;
import net.socialgamer.cah.Constants.*;
import net.socialgamer.cah.RequestWrapper;
import net.socialgamer.cah.customsets.CustomDeck;
import net.socialgamer.cah.customsets.CustomCardsService;
import net.socialgamer.cah.customsets.CustomDeck;
import net.socialgamer.cah.data.Game;
import net.socialgamer.cah.data.GameManager;
import net.socialgamer.cah.data.User;
import com.google.inject.Inject;
import javax.servlet.http.HttpSession;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ListCardsetsHandler extends GameWithPlayerHandler {
@ -36,7 +30,7 @@ public class ListCardsetsHandler extends GameWithPlayerHandler {
@Override
public Map<ReturnableData, Object> handleWithUserInGame(final RequestWrapper request,
final HttpSession session, final User user, final Game game) {
final HttpSession session, final User user, final Game game) {
final Map<ReturnableData, Object> data = new HashMap<ReturnableData, Object>();
final List<Map<CardSetData, Object>> setDatas = new ArrayList<>();

View File

@ -1,26 +1,18 @@
package net.socialgamer.cah.handlers;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpSession;
import net.socialgamer.cah.Constants.AjaxOperation;
import net.socialgamer.cah.Constants.AjaxRequest;
import net.socialgamer.cah.Constants.ErrorCode;
import net.socialgamer.cah.Constants.GameState;
import net.socialgamer.cah.Constants.LongPollEvent;
import net.socialgamer.cah.Constants.LongPollResponse;
import net.socialgamer.cah.Constants.ReturnableData;
import com.google.inject.Inject;
import net.socialgamer.cah.Constants.*;
import net.socialgamer.cah.RequestWrapper;
import net.socialgamer.cah.customsets.CustomDeck;
import net.socialgamer.cah.customsets.CustomCardsService;
import net.socialgamer.cah.customsets.CustomDeck;
import net.socialgamer.cah.data.Game;
import net.socialgamer.cah.data.GameManager;
import net.socialgamer.cah.data.QueuedMessage.MessageType;
import net.socialgamer.cah.data.User;
import com.google.inject.Inject;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.Map;
public class RemoveCardsetHandler extends GameWithPlayerHandler {
@ -37,7 +29,7 @@ public class RemoveCardsetHandler extends GameWithPlayerHandler {
@Override
public Map<ReturnableData, Object> handleWithUserInGame(final RequestWrapper request,
final HttpSession session, final User user, final Game game) {
final HttpSession session, final User user, final Game game) {
final Map<ReturnableData, Object> data = new HashMap<ReturnableData, Object>();
if (game.getHost() != user) {