This commit is contained in:
bvanvugt 2023-02-19 17:17:59 +00:00
parent a1bf6ec0ff
commit 0b1fbb5423
4 changed files with 7 additions and 5 deletions

View file

@ -1,6 +1,6 @@
package commands package commands
//ANSI escape codes to be used in the color output of the board view // ANSI escape codes to be used in the color output of the board view
const ( const (
TERM_RESET = "\033[0m" TERM_RESET = "\033[0m"

View file

@ -6,8 +6,8 @@ import (
// Test that two equal snakes collide and both get eliminated // Test that two equal snakes collide and both get eliminated
// also checks: // also checks:
// - food removed // - food removed
// - health back to max // - health back to max
var constrictorMoveAndCollideMAD = gameTestCase{ var constrictorMoveAndCollideMAD = gameTestCase{
"Constrictor Case Move and Collide", "Constrictor Case Move and Collide",
&BoardState{ &BoardState{

View file

@ -123,7 +123,7 @@ func AnySize() sizes {
// OddSizes generates square (width = height) board sizes with an odd number of positions // OddSizes generates square (width = height) board sizes with an odd number of positions
// in the vertical and horizontal directions. // in the vertical and horizontal directions.
// Examples: // Examples:
// - OddSizes(11,21) produces [(11,11), (13,13), (15,15), (17,17), (19,19), (21,21)] // - OddSizes(11,21) produces [(11,11), (13,13), (15,15), (17,17), (19,19), (21,21)]
func OddSizes(min, max int) sizes { func OddSizes(min, max int) sizes {
var s sizes var s sizes
for i := min; i <= max; i += 2 { for i := min; i <= max; i += 2 {

View file

@ -133,7 +133,9 @@ func NewPipeline(stageNames ...string) Pipeline {
// the stage names are provided. // the stage names are provided.
// //
// Example: // Example:
// NewPipelineFromRegistry(r, s, "stage1", "stage2") //
// NewPipelineFromRegistry(r, s, "stage1", "stage2")
//
// ... will result in stage "stage1" running first, then stage "stage2" running after. // ... will result in stage "stage1" running first, then stage "stage2" running after.
// //
// An error will be returned if an unregistered stage name is used (a name that is not // An error will be returned if an unregistered stage name is used (a name that is not