Fixed constrictor and wrapped names (#61)
This commit is contained in:
parent
6e01793750
commit
09aa6e01f9
2 changed files with 4 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ type ConstrictorRuleset struct {
|
||||||
StandardRuleset
|
StandardRuleset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *ConstrictorRuleset) Name() string { return "constrictor" }
|
||||||
|
|
||||||
func (r *ConstrictorRuleset) ModifyInitialBoardState(initialBoardState *BoardState) (*BoardState, error) {
|
func (r *ConstrictorRuleset) ModifyInitialBoardState(initialBoardState *BoardState) (*BoardState, error) {
|
||||||
initialBoardState, err := r.StandardRuleset.ModifyInitialBoardState(initialBoardState)
|
initialBoardState, err := r.StandardRuleset.ModifyInitialBoardState(initialBoardState)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,8 @@ type WrappedRuleset struct {
|
||||||
StandardRuleset
|
StandardRuleset
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (r *WrappedRuleset) Name() string { return "wrapped" }
|
||||||
|
|
||||||
func replace(value, min, max int32) int32 {
|
func replace(value, min, max int32) int32 {
|
||||||
if value < min {
|
if value < min {
|
||||||
return max
|
return max
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue