Skip to content
This repository has been archived by the owner on Jan 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #25 from StrangerCoug/triple-zero-roulette
Browse files Browse the repository at this point in the history
Add Triple-Zero Roulette
  • Loading branch information
StrangerCoug committed Dec 31, 2023
2 parents f4a3715 + c43eabd commit 41bac94
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright (c) 2018-2023, Jeffrey Hope
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions 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.
* * Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
* THIS LICENSE. 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
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.strangercoug.freecasino.games.controller.table;

import com.github.strangercoug.freecasino.games.model.table.TripleZeroRoulette;
import com.github.strangercoug.freecasino.games.view.table.TripleZeroRouletteView;

public class TripleZeroRouletteController extends RouletteController{
protected TripleZeroRouletteController(TripleZeroRoulette model, TripleZeroRouletteView view) {
super(model, view);
}

@Override
public void updateView() {
throw new UnsupportedOperationException("Not supported yet.");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
import java.math.BigDecimal;

/**
* Because of the need for a different wheel for American and European roulette,
* this class is abstract. However, since they are otherwise very similar games,
* most of the code will be here, with subclasses called only to handle the
* differences between the games.
* Because of the need for different wheels for the different variations of
* roulette, this class is abstract. However, since they are otherwise very
* similar games, most of the code will be here, with subclasses called only to
* handle the differences between the games.
*
* @author Jeffrey Hope <strangercoug@hotmail.com>
*/
Expand All @@ -61,12 +61,13 @@ protected enum Color {
* the order of the stops.
* <p>
* The zeroes have special handling in this enum, see the
* {@code AmericanRoulette} and {@code EuropeanRoulette} classes for
* details.
* {@code AmericanRoulette}, {@code EuropeanRoulette}, and {@code TripleZeroRoulette}
* classes for details.
*/
@Getter
protected enum Stop {
ZERO("0", Color.GREEN), DOUBLE_ZERO("00", Color.GREEN),
TRIPLE_ZERO("000", Color.GREEN),
ONE("1", Color.RED), TWO("2", Color.BLACK), THREE("3", Color.RED),
FOUR("4", Color.BLACK), FIVE("5", Color.RED), SIX("6", Color.BLACK),
SEVEN("7", Color.RED), EIGHT("8", Color.BLACK), NINE("9", Color.RED),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
* Copyright (c) 2018-2023, Jeffrey Hope
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions 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.
* * Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
* THIS LICENSE. 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
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.strangercoug.freecasino.games.model.table;

import com.github.strangercoug.freecasino.objs.Wheel;

/**
*
* @author Jeffrey Hope <strangercoug@hotmail.com>
*/
public class TripleZeroRoulette extends Roulette {
@Override
public Wheel generateWheel () {
Stop[] stops = {Stop.ZERO, Stop.TRIPLE_ZERO, Stop.DOUBLE_ZERO,
Stop.THIRTY_TWO, Stop.FIFTEEN, Stop.NINETEEN, Stop.FOUR,
Stop.TWENTY_ONE, Stop.TWO, Stop.TWENTY_FIVE, Stop.SEVENTEEN,
Stop.THIRTY_FOUR, Stop.SIX, Stop.TWENTY_SEVEN, Stop.THIRTEEN,
Stop.THIRTY_SIX, Stop.ELEVEN, Stop.THIRTY, Stop.EIGHT,
Stop.TWENTY_THREE, Stop.TEN, Stop.FIVE, Stop.TWENTY_FOUR,
Stop.SIXTEEN, Stop.THIRTY_THREE, Stop.ONE, Stop.TWENTY,
Stop.FOURTEEN, Stop.THIRTY_ONE, Stop.NINE, Stop.TWENTY_TWO,
Stop.EIGHTEEN, Stop.TWENTY_NINE, Stop.SEVEN, Stop.TWENTY_EIGHT,
Stop.TWELVE, Stop.THIRTY_FIVE, Stop.THREE, Stop.TWENTY_SIX};

return new Wheel(stops);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2018-2023, Jeffrey Hope
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the disclaimer
* below) provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions 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.
* * Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
* THIS LICENSE. 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
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package com.github.strangercoug.freecasino.games.view.table;

public class TripleZeroRouletteView extends RouletteView {
}

0 comments on commit 41bac94

Please sign in to comment.