-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Color names level - Word definitions corrections
- Loading branch information
1 parent
46ccfd2
commit 9a27906
Showing
24 changed files
with
106 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -312,6 +312,7 @@ class EngLookupK : WordLookupBase | |
keyseat, | ||
keystone, | ||
keyway, | ||
khaki, | ||
khaliff, | ||
khamsin, | ||
khan, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1420,7 +1420,6 @@ class EngLookupL : WordLookupBase | |
lernaeacea, | ||
lernean, | ||
lerot, | ||
les, | ||
lesbian, | ||
lese, | ||
lesion, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,6 @@ class EngLookupN : WordLookupBase | |
nakoo, | ||
nale, | ||
nall, | ||
nam, | ||
namable, | ||
namation, | ||
namaycush, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2231,7 +2231,6 @@ class EngLookupU : WordLookupBase | |
urchin, | ||
urchon, | ||
urdu, | ||
ure, | ||
urea, | ||
ureal, | ||
ureameter, | ||
|
56 changes: 56 additions & 0 deletions
56
WordisProject/Assets/Wordis/BlockPuzzle/GameCore/Levels/Campaign/ColorNames.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System; | ||
using System.Linq; | ||
using Assets.Wordis.BlockPuzzle.GameCore.Levels.Contracts; | ||
using Assets.Wordis.BlockPuzzle.GameCore.Words; | ||
|
||
namespace Assets.Wordis.BlockPuzzle.GameCore.Levels.Campaign | ||
{ | ||
/// <summary> | ||
/// See https://7esl.com/colour-vocabulary/ | ||
/// </summary> | ||
public class ColorNames : WordisGameLevelBase<ColorNames>, IWordisGameLevel | ||
{ | ||
public const int NeededMatches = 3; | ||
|
||
public static readonly WordisSettings LevelSettings = new WordisSettings( | ||
width: 9, | ||
height: 9, | ||
minWordLength: 3, | ||
waterLevel: 3); | ||
|
||
public static WordsSequence Colors => WordsSequence.FromCsv( | ||
@"White,Yellow,Blue,Red,Green,Black,Brown,Azure,Ivory,Teal,Silver, | ||
Purple,Gray,Orange,Maroon,Coral,Fuchsia,Wheat,Lime,Crimson,Khaki, | ||
Pink,Magenta,Olden,Plum,Olive,Cyan"); | ||
|
||
private ColorNames(WordisGame game) : base(game) | ||
{ | ||
} | ||
|
||
public ColorNames() : this(new WordisGame( | ||
LevelSettings, | ||
Colors | ||
.Shuffle() | ||
.AsLetterSource(shuffleWordLetters: true))) | ||
{ | ||
} | ||
|
||
public override string Title => "Color names"; // todo: localize | ||
|
||
public override string Goal => | ||
$"Match {NeededMatches} colors\n" + | ||
$"Like '{Colors.Word.ToUpperInvariant()}'"; // todo: localize | ||
|
||
public override string Progress => $"{MatchedColors} of {NeededMatches} colors matched"; // todo: localize | ||
|
||
public override bool IsCompleted => MatchedColors >= NeededMatches; | ||
|
||
public override ColorNames WithUpdatedGame(WordisGame updatedGame) => | ||
new ColorNames(updatedGame); | ||
|
||
private int MatchedColors => Game.Matches.All | ||
.Select(m => m.Word) | ||
.Intersect(Colors.Words, StringComparer.OrdinalIgnoreCase) | ||
.Count(); | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
WordisProject/Assets/Wordis/BlockPuzzle/GameCore/Levels/Campaign/ColorNames.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.