repo
stringlengths
1
191
file
stringlengths
23
351
code
stringlengths
0
5.32M
file_length
int64
0
5.32M
avg_line_length
float64
0
2.9k
max_line_length
int64
0
288k
extension_type
stringclasses
1 value
Ludii
Ludii-master/Core/src/other/action/state/ActionSetCounter.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Sets the counter of the state. * * @author Eric.Piette */ public f...
3,226
21.10274
81
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetNextPlayer.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Sets the next player. * * @author Eric.Piette */ public final clas...
4,182
20.786458
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetPending.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import main.Constants; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Sets a value to be in pending in the state. *...
3,616
21.748428
82
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetPot.java
package other.action.state; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.context.Context; /** * Sets the pot. * * @author Eric.Piette */ public final class ActionSetPot extends BaseAction { private static final long serialVersionUID = 1L; //----------...
3,492
20.169697
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetRotation.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import game.types.board.SiteType; import main.Constants; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; import other.state.c...
9,466
23.978892
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetScore.java
package other.action.state; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.context.Context; /** * Sets the score of a player. * * @author Eric.Piette */ public final class ActionSetScore extends BaseAction { private static final long serialVersionUID = 1L...
4,363
22.336898
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetState.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import game.types.board.SiteType; import main.Constants; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; import other.state.c...
10,556
24.623786
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetTemp.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Sets the temporary value of the state. * * @author Eric.Piette */ ...
3,655
21.708075
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetValue.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import game.types.board.SiteType; import main.Constants; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; import other.state.c...
9,540
23.093434
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionSetVar.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import main.Constants; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Sets the temporary value of the state. * * @...
4,065
22.367816
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionStoreStateInContext.java
package other.action.state; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.context.Context; /** * Stores the current state of the game. * * @author Eric.Piette */ public class ActionStoreStateInContext extends BaseAction { private static final long serial...
2,875
20.462687
123
java
Ludii
Ludii-master/Core/src/other/action/state/ActionTrigger.java
package other.action.state; import java.util.BitSet; import game.rules.play.moves.Moves; import other.action.Action; import other.action.ActionType; import other.action.BaseAction; import other.concept.Concept; import other.context.Context; /** * Triggers an event for a player. * * @author Eric.Piette */ public ...
3,920
21.02809
81
java
Ludii
Ludii-master/Core/src/other/concept/Concept.java
package other.concept; import java.util.ArrayList; import java.util.BitSet; import java.util.List; import java.util.Map; import compiler.Compiler; import game.Game; import main.grammar.Description; /** * Defines known concepts used in a game. * * Remarks: The documentation on top of each concept explains how the...
263,796
21.67661
152
java
Ludii
Ludii-master/Core/src/other/concept/ConceptComputationType.java
package other.concept; /** * The different concept computation types. * * @author Eric.Piette */ public enum ConceptComputationType { /** Compute during compilation. */ Compilation(1), /** Compute thanks to playouts. */ Playout(2), ; //---------------------------------------------------------------------...
836
16.808511
76
java
Ludii
Ludii-master/Core/src/other/concept/ConceptDataType.java
package other.concept; /** * The different concept data types. * * @author Eric.Piette */ public enum ConceptDataType { /** Boolean Data. */ BooleanData(1), /** Integer Data. */ IntegerData(2), /** String Data. */ StringData(3), /** Double Data. */ DoubleData(4), ; //-------------------------------...
846
14.981132
76
java
Ludii
Ludii-master/Core/src/other/concept/ConceptKeyword.java
package other.concept; /** * The keywords of the concepts. * * @author Eric.Piette */ public enum ConceptKeyword { /** To hop a neighbouring site. */ Hop(1, "Hop move concepts."), /** Involves Enemy piece. */ Enemy(2, "Enemy piece or player."), /** Tiling of the board. */ Tiling(3, "Tiling of the board.")...
5,637
17.983165
76
java
Ludii
Ludii-master/Core/src/other/concept/ConceptPurpose.java
package other.concept; /** * The different possible uses of a game concept. * * @author Eric.Piette */ public enum ConceptPurpose { /** Can be used for AI. */ AI(1), /** Can be used for reconstruction. */ Reconstruction(2), ; //------------------------------------------------------------------------- /**...
789
16.173913
76
java
Ludii
Ludii-master/Core/src/other/concept/ConceptType.java
package other.concept; /** * The different types of the concepts. * * @author Eric.Piette */ public enum ConceptType { /** The properties of the game. */ Properties(1), /** The concepts related to the equipment. */ Equipment(2), /** The concepts related to the meta rules. */ Meta(3), /** The concepts re...
1,413
17.363636
76
java
Ludii
Ludii-master/Core/src/other/concept/EndConcepts.java
package other.concept; import java.util.BitSet; import game.Game; import game.functions.booleans.BooleanFunction; import game.rules.end.Result; import game.types.play.ResultType; import game.types.play.RoleType; import main.Constants; import other.context.Context; /** * Utilities class used to compute the end conce...
15,849
32.158996
117
java
Ludii
Ludii-master/Core/src/other/context/Context.java
package other.context; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; import java.util.concurrent.locks.ReentrantLock; import org.apache.commons.rng.core.source64.SplitMix64; import game.Game; import game.equipment.Equipment; import game.equipment.component.Com...
38,911
21.324727
115
java
Ludii
Ludii-master/Core/src/other/context/EvalContext.java
package other.context; import java.util.Arrays; import game.functions.region.RegionFunction; import game.util.equipment.Region; import main.Constants; /** * Class storing all the data from context used in the eval method of each * ludeme. * * WARNING: All the data here should never be used outside of the eval m...
6,656
16.704787
79
java
Ludii
Ludii-master/Core/src/other/context/EvalContextData.java
package other.context; /** * Defines each eval context data used in the eval method of the ludemes. * * @author Eric.Piette */ public enum EvalContextData { /** Variable used to iterate the 'from' locations. */ From, /** Variable used to iterate the levels. */ Level, /** Variable used to iterate the 'to' l...
1,132
16.984127
76
java
Ludii
Ludii-master/Core/src/other/context/InformationContext.java
package other.context; import java.util.ArrayList; import java.util.List; import game.equipment.component.Component; import game.equipment.container.Container; import game.rules.play.moves.BaseMoves; import game.rules.play.moves.Moves; import game.types.board.SiteType; import main.Constants; import main.collections.F...
14,968
35.599022
102
java
Ludii
Ludii-master/Core/src/other/context/TempContext.java
package other.context; import other.state.CopyOnWriteState; import other.state.State; import other.trial.TempTrial; import other.trial.Trial; /** * A temporary version of a context. Can only be constructed by "copying" another * context. Contains optimisations that may make it invalid for long-term use, * only int...
1,191
23.833333
81
java
Ludii
Ludii-master/Core/src/other/location/CellOnlyLocation.java
package other.location; import game.types.board.SiteType; /** * A version of Location for games that use only Cells (no other site types) * * @author Dennis Soemers */ public final class CellOnlyLocation extends Location { //------------------------------------------------------------------------- /** */ ...
1,935
16.441441
77
java
Ludii
Ludii-master/Core/src/other/location/FlatCellOnlyLocation.java
package other.location; import game.types.board.SiteType; /** * A version of Location for games that use only Cells, and no levels * * @author Dennis Soemers */ public final class FlatCellOnlyLocation extends Location { //------------------------------------------------------------------------- /** */ pri...
1,640
17.032967
77
java
Ludii
Ludii-master/Core/src/other/location/FlatVertexOnlyLocation.java
package other.location; import game.types.board.SiteType; /** * A version of Location for games that use only Vertices, and no levels * * @author Dennis Soemers */ public final class FlatVertexOnlyLocation extends Location { //------------------------------------------------------------------------- /** */...
1,655
17.197802
77
java
Ludii
Ludii-master/Core/src/other/location/FullLocation.java
package other.location; import game.types.board.SiteType; /** * A "Full" version of Location, with all the data we could ever need (no optimisations) * * @author Dennis Soemers */ public final class FullLocation extends Location { //------------------------------------------------------------------------- /...
2,584
16.827586
88
java
Ludii
Ludii-master/Core/src/other/location/Location.java
package other.location; import java.io.Serializable; import game.types.board.SiteType; /** * A position is the site of a component and the level on it (in case of stack). * This is used for the cache Owned on the trial. * * @author Eric.Piette and Matthew.Stephenson and Dennis Soemers * */ public abstract cla...
2,246
21.47
93
java
Ludii
Ludii-master/Core/src/other/model/AlternatingMove.java
package other.model; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; import game.Game; import game.rules.phase.Phase; import game.rules.play.moves.Moves; import main.collections.FastArrayList; import other.AI; import o...
15,620
22.073855
108
java
Ludii
Ludii-master/Core/src/other/model/MatchModel.java
package other.model; import java.util.List; import java.util.Random; import game.Game; import game.match.Subgame; import game.rules.play.moves.Moves; import other.AI; import other.context.Context; import other.move.Move; import other.playout.PlayoutMoveSelector; import other.trial.Trial; /** * Model for multi-game ...
7,567
24.654237
174
java
Ludii
Ludii-master/Core/src/other/model/Model.java
package other.model; import java.util.Arrays; import java.util.List; import other.AI; import other.action.Action; import other.context.Context; import other.move.Move; import other.playout.Playout; //----------------------------------------------------------------------------- /** * Model of game's control flow, c...
13,417
31.100478
136
java
Ludii
Ludii-master/Core/src/other/model/SimulationMove.java
package other.model; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; import game.Game; import main.Status; import main.collections.FastArrayList; import other.AI; import other.ThinkingThread; import other.context.Conte...
8,858
24.311429
176
java
Ludii
Ludii-master/Core/src/other/model/SimultaneousMove.java
package other.model; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Random; import java.util.concurrent.ThreadLocalRandom; import game.Game; import game.rules.play.moves.Moves; import main.collections.FastArrayList; import other.AI; import other.ThinkingThread; import oth...
20,805
23.362998
124
java
Ludii
Ludii-master/Core/src/other/move/Move.java
package other.move; import java.util.ArrayList; import java.util.BitSet; import java.util.List; import org.apache.commons.rng.core.RandomProviderDefaultState; import annotations.Hide; import game.Game; import game.equipment.container.other.Dice; import game.rules.play.moves.Moves; import game.types.board.RelationTyp...
45,231
25.175926
124
java
Ludii
Ludii-master/Core/src/other/move/MoveScore.java
package other.move; /** * Record of a move and its estimated score. * @author cambolbro */ public class MoveScore { private final Move move; private final float score; /** * @param move The move. * @param score The score. */ public MoveScore(final Move move, final float score) { this.move = move;...
592
12.477273
53
java
Ludii
Ludii-master/Core/src/other/move/MoveSequence.java
package other.move; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.List; /** * Represents, and provides views of, a sequence of moves. Every Move object * is expected to be immutable, and MoveSequences are expected to never shrink * (but they can grow). A MoveS...
6,730
22.130584
94
java
Ludii
Ludii-master/Core/src/other/move/MoveUtilities.java
package other.move; import annotations.Hide; import game.rules.play.moves.Moves; import game.rules.play.moves.nonDecision.effect.Then; import main.collections.FastArrayList; import other.context.Context; /** * Helper functions for dealing with the complexity of moves * * @author mrraow and Dennis Soemers */ @Hid...
5,269
27.333333
121
java
Ludii
Ludii-master/Core/src/other/move/MovesIterator.java
package other.move; import java.util.Iterator; import java.util.function.BiPredicate; import other.context.Context; /** * Abstract class for iterators over moves. Includes the additional abstract "canMoveConditionally" * method for optimisation purposes, on top of the standard Iterator interface. * * @author Den...
919
30.724138
99
java
Ludii
Ludii-master/Core/src/other/playout/HeuristicMoveSelector.java
package other.playout; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ThreadLocalRandom; import game.Game; import main.collections.FastArrayList; import metadata.ai.heuristics.Heuristics; import other.RankUtils; import other.context.Context; import other.context.TempContext; import oth...
3,295
22.542857
95
java
Ludii
Ludii-master/Core/src/other/playout/HeuristicSamplingMoveSelector.java
package other.playout; import java.util.concurrent.ThreadLocalRandom; import game.Game; import main.collections.FastArrayList; import metadata.ai.heuristics.Heuristics; import other.context.Context; import other.move.Move; import other.move.MoveScore; /** * Heuristic-based playout move selector using Heuristic Samp...
6,271
26.508772
113
java
Ludii
Ludii-master/Core/src/other/playout/Playout.java
package other.playout; import java.util.List; import java.util.Random; import other.AI; import other.context.Context; import other.trial.Trial; //----------------------------------------------------------------------------- /** * Custom playout types. * * @author cambolbro */ public interface Playout { //--...
1,593
26.482759
84
java
Ludii
Ludii-master/Core/src/other/playout/PlayoutAddToEmpty.java
package other.playout; import java.util.List; import java.util.Random; import game.Game; import game.functions.ints.IntConstant; import game.rules.phase.Phase; import game.rules.play.moves.Moves; import game.rules.play.moves.decision.MoveSwapType; import game.rules.play.moves.nonDecision.effect.state.swap.SwapPlayers...
6,915
25.098113
111
java
Ludii
Ludii-master/Core/src/other/playout/PlayoutFilter.java
package other.playout; import java.util.List; import java.util.Random; import game.Game; import game.functions.booleans.BooleanFunction; import game.functions.ints.IntConstant; import game.rules.phase.Phase; import game.rules.play.Play; import game.rules.play.moves.Moves; import game.rules.play.moves.decision.MoveSwa...
8,762
25.716463
111
java
Ludii
Ludii-master/Core/src/other/playout/PlayoutMoveSelector.java
package other.playout; import java.util.Random; import main.collections.FastArrayList; import other.context.Context; import other.move.Move; /** * Abstract class for an object that can efficiently select moves in playouts * (including custom, optimised playout strategies) * * @author Dennis Soemers */ public ab...
3,101
27.2
91
java
Ludii
Ludii-master/Core/src/other/playout/PlayoutNoRepetition.java
package other.playout; import java.util.List; import java.util.Random; import game.Game; import game.functions.ints.IntConstant; import game.rules.meta.no.repeat.NoRepeat; import game.rules.phase.Phase; import game.rules.play.moves.Moves; import game.rules.play.moves.decision.MoveSwapType; import game.rules.play.move...
4,082
23.896341
111
java
Ludii
Ludii-master/Core/src/other/state/CopyOnWriteState.java
package other.state; import other.state.track.OnTrackIndices; import other.state.track.OnTrackIndicesCOW; /** * A subclass of State, with copy-on-write optimisations. Note * that changes to the state that we copy from may seep through * into this copy. * * @author Dennis Soemers */ public final class CopyOnWrit...
1,069
23.883721
89
java
Ludii
Ludii-master/Core/src/other/state/OwnedIndexMapper.java
package other.state; import java.io.Serializable; import java.util.Arrays; import game.Game; import game.equipment.component.Component; import main.Constants; /** * A helper object for Owned structures, which allows us to map from * player + component indices into player + array indices, where the * array indices...
3,155
25.521008
94
java
Ludii
Ludii-master/Core/src/other/state/State.java
package other.state; import java.io.Serializable; import java.util.Arrays; import java.util.BitSet; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.Objects; import annotations.Hide; import game.Game; import game.Game.StateConstructorLock; import game.equipment.container.Co...
55,690
23.984747
180
java
Ludii
Ludii-master/Core/src/other/state/container/BaseContainerState.java
package other.state.container; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.util.ArrayList; import java.util.BitSet; import java.util.HashMap; import java.util.List; import java.util.Map; import game.Game; import game.equipment.container.Container; impor...
14,608
25.370036
155
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerFlatEdgeState.java
package other.state.container; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import game.util.equipment.Region; import main.Constants; import main.collections.ChunkSet; import other.Sites; import other.state.State; import other.state.zh...
43,534
24.533724
122
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerFlatState.java
package other.state.container; import java.util.ArrayList; import java.util.List; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import main.Constants; import main.collections.ChunkSet; import other.state.State; import other.state.zhash...
41,731
27.447171
154
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerFlatVertexState.java
package other.state.container; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import game.util.equipment.Region; import main.Constants; import main.collections.ChunkSet; import other.Sites; import other.state.State; import other.state.zh...
44,619
25.108836
141
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerGraphState.java
package other.state.container; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import game.util.equipment.Region; import main.Constants; import main.collections.ChunkSet; import other.state.State; import other.state.zhash.HashedBitSet; im...
52,009
32.42545
140
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerState.java
package other.state.container; import java.io.Serializable; import java.util.BitSet; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.util.equipment.Region; import main.collections.ChunkSet; import other.Sites; import other.state.State; import other.state.symm...
38,654
26.260226
198
java
Ludii
Ludii-master/Core/src/other/state/container/ContainerStateFactory.java
package other.state.container; import game.Game; import game.equipment.container.Container; import main.Constants; import main.collections.ChunkStack; import other.context.Context; import other.state.puzzle.ContainerDeductionPuzzleState; import other.state.puzzle.ContainerDeductionPuzzleStateLarge; import other.state....
6,942
34.78866
141
java
Ludii
Ludii-master/Core/src/other/state/owned/CellOnlyOwned.java
package other.state.owned; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.Game; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import other.location.CellOnlyLocation; import other.location.Location; import other.state.OwnedIndexMapper; /** *...
7,447
25.411348
128
java
Ludii
Ludii-master/Core/src/other/state/owned/FlatCellOnlyOwned.java
package other.state.owned; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.Game; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import main.collections.FastTIntArrayList; import other.location.FlatCellOnlyLocation; import other.state.OwnedIndex...
6,290
26.233766
128
java
Ludii
Ludii-master/Core/src/other/state/owned/FlatVertexOnlyOwned.java
package other.state.owned; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.Game; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import main.collections.FastTIntArrayList; import other.location.FlatVertexOnlyLocation; import other.state.OwnedInd...
6,345
26.471861
128
java
Ludii
Ludii-master/Core/src/other/state/owned/FlatVertexOnlyOwnedSingleComp.java
package other.state.owned; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.Game; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import main.collections.FastTIntArrayList; import other.location.FlatVertexOnlyLocation; import other.state.OwnedInd...
5,712
26.73301
128
java
Ludii
Ludii-master/Core/src/other/state/owned/FullOwned.java
package other.state.owned; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.Game; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import other.location.FullLocation; import other.location.Location; import other.state.OwnedIndexMapper; /** * A "...
7,649
25.19863
128
java
Ludii
Ludii-master/Core/src/other/state/owned/Owned.java
package other.state.owned; import java.util.List; import game.types.board.SiteType; import gnu.trove.list.array.TIntArrayList; import other.location.Location; /** * Interface for objects that can quickly tell us which location contain * pieces (of certain types) for certain players (without requiring full * scans...
4,071
27.082759
129
java
Ludii
Ludii-master/Core/src/other/state/owned/OwnedFactory.java
package other.state.owned; import game.Game; import game.equipment.component.Component; import game.types.state.GameType; /** * Factory to instantiate appropriate "Owned" containers for a given * game's states. * * @author Dennis Soemers */ public final class OwnedFactory { //---------------------------------...
2,004
20.105263
76
java
Ludii
Ludii-master/Core/src/other/state/puzzle/BaseContainerStateDeductionPuzzles.java
package other.state.puzzle; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.util.equipment.Region; import main.collections.ChunkSet; import other.Sites; import ot...
23,711
26.286536
157
java
Ludii
Ludii-master/Core/src/other/state/puzzle/ContainerDeductionPuzzleState.java
package other.state.puzzle; import java.util.BitSet; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import main.collections.ChunkSet; import main.math.BitTwiddling; import other.context.Context; import other.state.State; import other.state.container.ContainerState; impo...
11,115
20.21374
119
java
Ludii
Ludii-master/Core/src/other/state/puzzle/ContainerDeductionPuzzleStateLarge.java
package other.state.puzzle; import java.util.ArrayList; import java.util.BitSet; import java.util.List; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import other.context.Context; import other.state.State; import other.state.container.ContainerState; import other.state...
9,962
21.090909
97
java
Ludii
Ludii-master/Core/src/other/state/stacking/BaseContainerStateStacking.java
package other.state.stacking; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import other.state.State; import other.state.container.BaseContainerState; /** * Global State for a stacking container item. * * @author Eric.Piette */ public abstract class BaseContainerS...
7,041
29.617391
116
java
Ludii
Ludii-master/Core/src/other/state/stacking/ContainerGraphStateStacks.java
package other.state.stacking; import java.util.Arrays; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import game.util.equipment.Region; import main.Constants; import other.state.State; import other.state.zhash.HashedBitSet; import othe...
44,248
30.38227
138
java
Ludii
Ludii-master/Core/src/other/state/stacking/ContainerGraphStateStacksLarge.java
package other.state.stacking; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import game.util.equipment.Region; import main.Constants; import main.collections.ListStack; import other.state.State; import other.state.zhash.ZobristHashGener...
27,256
24.959048
152
java
Ludii
Ludii-master/Core/src/other/state/stacking/ContainerStateStacks.java
package other.state.stacking; import java.util.Arrays; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import main.Constants; import main.collections.ChunkSet; import other.state.State; import other.state.zhash.HashedBitSet; import other...
36,205
28.459723
157
java
Ludii
Ludii-master/Core/src/other/state/stacking/ContainerStateStacksLarge.java
package other.state.stacking; import game.Game; import game.equipment.container.Container; import game.types.board.SiteType; import game.types.state.GameType; import main.Constants; import main.collections.ChunkSet; import main.collections.ListStack; import other.state.State; import other.state.zhash.ZobristHashGenera...
26,494
26.314433
157
java
Ludii
Ludii-master/Core/src/other/state/symmetry/AcceptAll.java
package other.state.symmetry; /** * Universal acceptor; all symmetries are valid * @author mrraow */ public class AcceptAll implements SymmetryValidator { @Override public boolean isValid(SymmetryType type, int angleIndex, int maxAngles) { return true; } }
270
15.9375
74
java
Ludii
Ludii-master/Core/src/other/state/symmetry/AcceptNone.java
package other.state.symmetry; /** * Universal rejector; no symmetries are valid, except the identity * @author mrraow */ public class AcceptNone implements SymmetryValidator { @Override public boolean isValid(final SymmetryType type, final int symmetryIndex, final int symmetryCount) { switch (type) { cas...
465
20.181818
99
java
Ludii
Ludii-master/Core/src/other/state/symmetry/ReflectionsOnly.java
package other.state.symmetry; /** * Only reflections are valid * @author mrraow */ public class ReflectionsOnly implements SymmetryValidator { @Override public boolean isValid (final SymmetryType type, final int symmetryIndex, final int symmetryCount) { switch(type) { case REFLECTIONS: return true; case ...
488
22.285714
100
java
Ludii
Ludii-master/Core/src/other/state/symmetry/RotationsOnly.java
package other.state.symmetry; /** * Only rotational symmetries and identity operators are valid * @author mrraow */ public class RotationsOnly implements SymmetryValidator { @Override public boolean isValid(final SymmetryType type, final int symmetryIndex, final int symmetryCount) { switch(type) { case REF...
477
21.761905
99
java
Ludii
Ludii-master/Core/src/other/state/symmetry/SubstitutionsOnly.java
package other.state.symmetry; /** * Only player substitutions are valid * @author mrraow */ public class SubstitutionsOnly implements SymmetryValidator { @Override public boolean isValid(final SymmetryType type, final int symmetryIndex, final int symmetryCount) { switch(type) { case REFLECTIONS: return fal...
457
20.809524
99
java
Ludii
Ludii-master/Core/src/other/state/symmetry/SymmetryType.java
package other.state.symmetry; import java.util.EnumSet; /** * All supported types of symmetry * @author mrraow */ public enum SymmetryType { /** * Rotation symmetries. */ ROTATIONS, /** * Reflections symmetries. */ REFLECTIONS, /** * Substitutions symmetries. */ SUBSTITUTIONS; /** ...
546
14.194444
85
java
Ludii
Ludii-master/Core/src/other/state/symmetry/SymmetryUtils.java
package other.state.symmetry; import java.awt.geom.Point2D; import java.util.BitSet; /** * Utilities to support symmetry processing * @author mrraow */ public class SymmetryUtils { /** * Note that ludii counts players from 1 upwards, with element 0 reserved for 'empty' and other shenanigans * This function w...
5,097
27.322222
127
java
Ludii
Ludii-master/Core/src/other/state/symmetry/SymmetryValidator.java
package other.state.symmetry; /** * Validates a symmetry, to see if it is useful in this context. * @author [email protected] */ public interface SymmetryValidator { /** * NOTE: This function should almost always return true when symmetryIndex==0 - this will probably be the identity operator * * @param typ...
640
32.736842
125
java
Ludii
Ludii-master/Core/src/other/state/track/OnTrackIndices.java
package other.state.track; import java.util.ArrayList; import java.util.List; import game.equipment.container.board.Track; import gnu.trove.list.array.TIntArrayList; import gnu.trove.map.TIntObjectMap; import gnu.trove.map.hash.TIntObjectHashMap; import main.collections.FastTIntArrayList; /** * Structure used to kn...
8,965
26.931464
103
java
Ludii
Ludii-master/Core/src/other/state/track/OnTrackIndicesCOW.java
package other.state.track; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import main.collections.FastTIntArrayList; /** * A subclass of OnTrackIndices, with copy-on-write (COW) optimisations. * * @author Dennis Soemers */ public class OnTrackIndicesCOW extends OnTrackIndices { //...
2,365
27.853659
99
java
Ludii
Ludii-master/Core/src/other/state/zhash/HashedBitSet.java
package other.state.zhash; import java.io.Serializable; import java.util.BitSet; import other.state.State; /** * Wrapper around ChunkSet, to make sure it is managed correctly * If ChunkSet were an interface, I'd use the decorator pattern... * * @author mrraow */ public class HashedBitSet implements Serializabl...
4,965
27.215909
108
java
Ludii
Ludii-master/Core/src/other/state/zhash/HashedChunkSet.java
package other.state.zhash; import java.io.Serializable; import main.collections.ChunkSet; import main.math.BitTwiddling; import other.state.State; //----------------------------------------------------------------------------- /** * Wrapper around ChunkSet, to make sure it is managed correctly * If ChunkSet were ...
7,716
29.623016
157
java
Ludii
Ludii-master/Core/src/other/state/zhash/HashedChunkStack.java
package other.state.zhash; import java.io.Serializable; import game.types.board.SiteType; import main.collections.ChunkStack; import other.state.State; /** * Wrapper around ChunkSet, to make sure it is managed correctly * If ChunkSet were an interface, I'd use the decorator pattern... * * @author mrraow */ pub...
16,357
24.050536
117
java
Ludii
Ludii-master/Core/src/other/state/zhash/HashedChunkStackLarge.java
package other.state.zhash; import java.io.Serializable; import game.types.board.SiteType; import main.collections.ListStack; import other.state.State; /** * Wrapper around ListStack, still to do.... * * @author mrraow */ public class HashedChunkStackLarge implements Serializable { private static final long ser...
16,165
24.180685
117
java
Ludii
Ludii-master/Core/src/other/state/zhash/ZobristHashGenerator.java
package other.state.zhash; import org.apache.commons.rng.core.source64.SplitMix64; /** * Generates sequences for Zobrist hashing * For now, just a wrapper around SplitMix64, but easy to change if that proves inadequate * * @author mrraow * */ public class ZobristHashGenerator extends SplitMix64 { private sta...
1,044
19.9
128
java
Ludii
Ludii-master/Core/src/other/state/zhash/ZobristHashUtilities.java
package other.state.zhash; /** * Zobrist hashing - attempts to reduce a board state to a 64 bit number * * Basic contract: * - same position in different parts of the tree should have the same hash * - different positions will have different hashes _most_ of the time * - fast to calculate via incremental update...
2,676
30.494118
130
java
Ludii
Ludii-master/Core/src/other/topology/AxisLabel.java
package other.topology; import java.awt.geom.Point2D; import java.io.Serializable; //----------------------------------------------------------------------------- /** * Board cell. * * @author cambolbro */ public final class AxisLabel implements Serializable { private static final long serialVersionUID = 1L; ...
1,047
16.762712
79
java
Ludii
Ludii-master/Core/src/other/topology/Cell.java
package other.topology; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.types.board.SiteType; import main.math.Point3D; /** * Cell of the board (equivalent to a face of the graph). * * @author Eric.Piette and Matthew.Stephenson */ public final class Cell extends Topol...
5,850
19.245675
80
java
Ludii
Ludii-master/Core/src/other/topology/Edge.java
package other.topology; import java.awt.geom.Point2D; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; import java.util.List; import game.types.board.RelationType; import game.types.board.SiteType; import main.math.Point3D; import main.math.Vector; /** * Edg...
8,464
19.251196
87
java
Ludii
Ludii-master/Core/src/other/topology/SiteFinder.java
package other.topology; import game.equipment.container.board.Board; import game.types.board.SiteType; /** * Find a cell with a specified coordinate label. * * @author cambolbro and Eric.Piette */ public final class SiteFinder { /** * @param board The board. * @param coord The coordinate * @param type Th...
1,023
25.25641
101
java
Ludii
Ludii-master/Core/src/other/topology/Topology.java
package other.topology; import java.awt.geom.Point2D; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; import java.util.Collections; import java.util.Comparator; import java.util.EnumMap; import java.util.HashMap; import java.util.List; import java.util.Map; im...
85,221
29.933575
165
java
Ludii
Ludii-master/Core/src/other/topology/TopologyElement.java
package other.topology; import java.awt.geom.Point2D; import java.util.ArrayList; import java.util.List; import game.types.board.RelationType; import game.types.board.SiteType; import game.util.directions.DirectionFacing; import game.util.graph.Properties; import main.math.Point3D; import main.math.RCL; /** * Commo...
8,732
18.713318
102
java
Ludii
Ludii-master/Core/src/other/topology/Vertex.java
package other.topology; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import game.types.board.SiteType; import main.math.Point3D; /** * Vertex of the graph (equivalent to any intersection of a board). * * @author Eric.Piette */ public final class Vertex extends TopologyElement ...
4,256
17.428571
80
java
Ludii
Ludii-master/Core/src/other/translation/LanguageUtils.java
package other.translation; import java.util.ArrayList; import java.util.List; import game.types.board.SiteType; import game.types.play.RoleType; import main.Constants; /** * @author Matthew.Stephenson * */ public class LanguageUtils { //------------------------------------------------------------------------- ...
9,307
24.088949
122
java
Ludii
Ludii-master/Core/src/other/trial/AuxilTrialData.java
package other.trial; import java.util.ArrayList; import java.util.List; import game.rules.play.moves.Moves; import gnu.trove.list.array.TIntArrayList; import other.context.Context; import other.move.Move; import other.state.State; /** * Wrapper class for auxiliary data for Trials, which we usually do not want to ke...
6,379
25.255144
98
java
Ludii
Ludii-master/Core/src/other/trial/MatchTrial.java
package other.trial; import java.util.ArrayList; import java.util.List; //----------------------------------------------------------------------------- /** * Record of a complete match. * * @author cambolbro */ public final class MatchTrial { /** List of instances making up this match. */ protected final List...
1,195
17.984127
79
java
Ludii
Ludii-master/Core/src/other/trial/TempTrial.java
package other.trial; import other.move.MoveSequence; /** * A temporary version of a Trial. Can only be constructed by "copying" another * trial. Contains optimisations that may make it invalid for long-term use, * only intended to be used shortly and temporarily after creation. Changes to * the source-Trial may a...
1,006
22.97619
79
java
Ludii
Ludii-master/Core/src/other/trial/Trial.java
package other.trial; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.ObjectOutputStream; import java.io.PrintWriter; import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import ...
25,337
23.017062
242
java
Ludii
Ludii-master/Core/src/other/uf/UnionFind.java
package other.uf; import java.io.Serializable; //----------------------------------------------------------------------------- /** * Main file to create Union tree * (with one by one move in each of the game state) * * @author tahmina */ public class UnionFind implements Serializable { private static final l...
5,416
27.81383
144
java