Date: Sat Sep 24 21:13:45 2011
New Revision: 1175265
URL: http://svn.apache.org/viewvc?rev=1175265&view=rev
Log:
first checkin of Game class
Added:
labs/openelo/src/main/java/org/apache/openelo/Game.java (with props)
Added: labs/openelo/src/main/java/org/apache/openelo/Game.java
URL: http://svn.apache.org/viewvc/labs/openelo/src/main/java/org/apache/openelo/Game.java?rev=1175265&view=auto
==============================================================================
--- labs/openelo/src/main/java/org/apache/openelo/Game.java (added)
+++ labs/openelo/src/main/java/org/apache/openelo/Game.java Sat Sep 24 21:13:45 2011
@@ -0,0 +1,59 @@
+package org.apache.openelo;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+
+/**
+ * A game represent a match between two players, and related result.
+ *
+ * If gameResult == WIN -> playerA won;
+ * If gameResult == LOSE -> playerB won;
+ */
+public final class Game<I>
+{
+
+ private final Player<I> playerA;
+
+ private final Player<I> playerB;
+
+ private final GameResult gameResult;
+
+ public Game( Player<I> playerA, Player<I> playerB, GameResult gameResult )
+ {
+ this.playerA = playerA;
+ this.playerB = playerB;
+ this.gameResult = gameResult;
+ }
+
+ public Player<I> getPlayerA()
+ {
+ return playerA;
+ }
+
+ public Player<I> getPlayerB()
+ {
+ return playerB;
+ }
+
+ public GameResult getGameResult()
+ {
+ return gameResult;
+ }
+
+}
Propchange: labs/openelo/src/main/java/org/apache/openelo/Game.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: labs/openelo/src/main/java/org/apache/openelo/Game.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Propchange: labs/openelo/src/main/java/org/apache/openelo/Game.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org
No comments:
Post a Comment