Skip to content

Commit

Permalink
Additional levels (#89)
Browse files Browse the repository at this point in the history
- Color names level
- Word definitions corrections
  • Loading branch information
NicklausBrain authored Feb 3, 2021
1 parent 46ccfd2 commit 9a27906
Show file tree
Hide file tree
Showing 24 changed files with 106 additions and 86 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9882,6 +9882,7 @@ class EngLookupC : WordLookupBase
cuvette,
cyamelide,
cyamellone,
cyan,
cyanate,
cyanaurate,
cyanean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,6 @@ class EngLookupE : WordLookupBase
edulcorative,
edulcorator,
edulious,
eek,
eeke,
eel,
eelbuck,
eelfare,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ class EngLookupK : WordLookupBase
keyseat,
keystone,
keyway,
khaki,
khaliff,
khamsin,
khan,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,6 @@ class EngLookupL : WordLookupBase
lernaeacea,
lernean,
lerot,
les,
lesbian,
lese,
lesion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ class EngLookupN : WordLookupBase
nakoo,
nale,
nall,
nam,
namable,
namation,
namaycush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1034,9 +1034,6 @@ class EngLookupO : WordLookupBase
oolong,
oomiac,
oomiak,
oon,
oones,
oop,
oopack,
oopak,
oophore,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2231,7 +2231,6 @@ class EngLookupU : WordLookupBase
urchin,
urchon,
urdu,
ure,
urea,
ureal,
ureameter,
Expand Down
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();
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ namespace Assets.Wordis.BlockPuzzle.GameCore.Levels.Campaign
/// </summary>
public class Letter4Animals : WordisGameLevelBase<Letter4Animals>, IWordisGameLevel
{
public const int NeededMatches = 7;
public const int NeededMatches = 3;

public static readonly WordisSettings LevelSettings = new WordisSettings(
width: 9,
height: 9,
minWordLength: 3,
waterLevel: 0);
waterLevel: 3);

/// <inheritdoc cref="Letter4Animals "/>
public static WordsSequence Animals => WordsSequence.FromCsv(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public class Letter4Palindromes : WordisGameLevelBase<Letter4Palindromes>, IWord
public const int NeededMatches = 5;

public static readonly WordisSettings LevelSettings = new WordisSettings(
width: 6,
height: 6,
width: 7,
height: 7,
minWordLength: 4,
waterLevel: 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,33 @@ public void Letter4Animals_AllWordsExist()
Assert.IsTrue(allWordsExists);
}

[Test]
public void ColorNames_WhenXColorsMatched_IsCompleted()
{
var requiredMatches =
ColorNames.Colors.Words
.Take(ColorNames.NeededMatches)
.Select(StrToWordMatch)
.ToArray();

var initialState = new ColorNames();
var finalState = initialState
.WithUpdatedGame(
initialState.Game.WithWordMatches(requiredMatches));

Assert.IsTrue(finalState.IsCompleted);
}

[Test]
public void ColorNames_AllWordsExist()
{
var allWordsExists = ColorNames.Colors.Words
.Aggregate(true, (acc, word) =>
acc && CheckWord(word));

Assert.IsTrue(allWordsExists);
}

private static WordMatchEx StrToWordMatch(string word) =>
new WordMatchEx(new WordMatch(
word.Select(c => new StaticChar(1, 3, c))), 3, DateTimeOffset.Now);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class SelectLevel : MonoBehaviour
new Letter3Palindromes(),
new Letter3Animals(),
new Letter4Palindromes(),
new ColorNames(),
new Letter4Animals(),
};

Expand Down
4 changes: 0 additions & 4 deletions WordisProject/Assets/Wordis/Resources/Dictionary/B.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2579,14 +2579,10 @@ Befrill (v. t.) To furnish or deck with a frill.
Befringe (v. t.) To furnish with a fringe; to form a fringe upon; to adorn as with fringe.
Befuddled (imp. & p. p.) of Befuddle
Befuddle (v. t.) To becloud and confuse, as with liquor.
Beg (n.) A title of honor in Turkey and in some other parts of the East; a bey.
Begged (imp. & p. p.) of Beg
Begging (p. pr. & vb. n.) of Beg
Beg (v. t.) To ask earnestly for; to entreat or supplicate for; to beseech.
Beg (v. t.) To ask for as a charity, esp. to ask for habitually or from house to house.
Beg (v. t.) To make petition to; to entreat; as, to beg a person to grant a favor.
Beg (v. t.) To take for granted; to assume without proof.
Beg (v. t.) To ask to be appointed guardian for, or to ask to have a guardian appointed for.
Beg (v. i.) To ask alms or charity, especially to ask habitually by the wayside or from house to house; to live by asking alms.
Bega (n.) See Bigha.
Begemmed (imp. & p. p.) of Begem
Expand Down
1 change: 1 addition & 0 deletions WordisProject/Assets/Wordis/Resources/Dictionary/C.csv
Original file line number Diff line number Diff line change
Expand Up @@ -16481,6 +16481,7 @@ Cuvette (n.) A cunette.
Cuvette (n.) A small vessel with at least two flat and transparent sides, used to hold a liquid sample to be analysed in the light path of a spectrometer.
Cyamelide (n.) A white amorphous substance, regarded as a polymeric modification of isocyanic acid.
Cyamellone (n.) A complex derivative of cyanogen, regarded as an acid, and known chiefly in its salts; -- called also hydromellonic acid.
Cyan (n.) A greenish-blue color. It is evoked by light with a predominant wavelength of between 490 and 520 nm, between the wavelengths of green and blue.
Cyanate (n.) A salt of cyanic acid.
Cyanaurate (n.) See Aurocyanide.
Cyanean (a.) Having an azure color.
Expand Down
4 changes: 0 additions & 4 deletions WordisProject/Assets/Wordis/Resources/Dictionary/E.csv
Original file line number Diff line number Diff line change
Expand Up @@ -687,8 +687,6 @@ Edulcoration (n.) The act of freeing from acids or any soluble substances, by af
Edulcorative (a.) Tending to /weeten or purify by affusions of water.
Edulcorator (n.) A contrivance used to supply small quantities of sweetened liquid, water, etc., to any mixture, or to test tubes, etc.; a dropping bottle.
Edulious (a.) Edible.
Eek (v. t.) Alt. of Eeke
Eeke (v. t.) See Eke.
Eel (n.) An elongated fish of many genera and species. The common eels of Europe and America belong to the genus Anguilla. The electrical eel is a species of Gymnotus. The so called vinegar eel is a minute nematode worm. See Conger eel, Electric eel, and Gymnotus.
Eelbuck (n.) An eelpot or eel basket.
Eelfare (n.) A brood of eels.
Expand Down Expand Up @@ -4640,7 +4638,6 @@ Ermined (a.) Clothed or adorned with the fur of the ermine.
Ermines (n.) Alt. of Erminois
Erminois (n.) See Note under Ermine, n., 4.
Ermit (n.) A hermit.
Ern (n.) Alt. of Erne
Erne (n.) A sea eagle, esp. the European white-tailed sea eagle (Haliaeetus albicilla).
Ern (v. i.) To stir with strong emotion; to grieve; to mourn. [Corrupted into yearn in modern editions of Shakespeare.]
Ernest (n.) See Earnest.
Expand Down Expand Up @@ -5019,7 +5016,6 @@ Essoin (n.) To excuse for nonappearance in court.
Essoiner (n.) An attorney who sufficiently excuses the absence of another.
Essonite (n.) Cinnamon stone, a variety of garnet. See Garnet.
Essorant (a.) Standing, but with the wings spread, as if about to fly; -- said of a bird borne as a charge on an escutcheon.
Est (n. & adv.) East.
Established (imp. & p. p.) of Establish
Establishing (p. pr. & vb. n.) of Establish
Establish (a.) To make stable or firm; to fix immovably or firmly; to set (a thing) in a place and make it stable there; to settle; to confirm.
Expand Down
3 changes: 0 additions & 3 deletions WordisProject/Assets/Wordis/Resources/Dictionary/H.csv
Original file line number Diff line number Diff line change
Expand Up @@ -3303,7 +3303,6 @@ High-strung (a.) Strung to a high pitch; spirited; sensitive; as, a high-strung
High-swelling (a.) Inflated; boastful.
Hight (n.) A variant of Height.
Hight (imp.) of Hight
Hot () of Hight
Hight (p. p.) of Hight
Hote () of Hight
Hoten () of Hight
Expand Down Expand Up @@ -4807,10 +4806,8 @@ Hotchpotch (n.) A mingled mass; a confused mixture; a stew of various ingredient
Hotchpotch (n.) A blending of property for equality of division, as when lands given in frank-marriage to one daughter were, after the death of the ancestor, blended with the lands descending to her and to her sisters from the same ancestor, and then divided in equal portions among all the daughters. In modern usage, a mixing together, or throwing into a common mass or stock, of the estate left by a person deceased and the amounts advanced to any particular child or children, for the purpose of a more equal division, or of equalizing the shares of all the children; the property advanced being accounted for at its value when given.
Hotcockles (n.) A childish play, in which one covers his eyes, and guesses who strikes him or his hand placed behind him.
Hatte (pres. & imp.) of Hote
Hot () of Hote
Hote (p. p.) of Hote
Hoten () of Hote
Hot () of Hote
Hote (v. t. & i.) To command; to enjoin.
Hote (v. t. & i.) To promise.
Hote (v. t. & i.) To be called; to be named.
Expand Down
1 change: 1 addition & 0 deletions WordisProject/Assets/Wordis/Resources/Dictionary/K.csv
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ Keyseat (v. t.) To form a key seat, as by cutting. See Key seat, under Key.
Keystone (n.) The central or topmost stone of an arch. This in some styles is made different in size from the other voussoirs, or projects, or is decorated with carving. See Illust. of Arch.
Key tone () See Keynote.
Keyway (n.) See Key way, under Key.
Khaki (n.) A color, a light shade of brown with a yellowish tinge. Khaki has been used by many armies around the world for uniforms, including camouflage.
Khaliff (n.) See Caliph.
Khamsin (n.) Same as Kamsin.
Khan (n.) A king; a prince; a chief; a governor; -- so called among the Tartars, Turks, and Persians, and in countries now or formerly governed by them.
Expand Down
2 changes: 0 additions & 2 deletions WordisProject/Assets/Wordis/Resources/Dictionary/N.csv
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ Naker (n.) A kind of kettledrum.
Nakoo (n.) The gavial.
Nale (n.) Ale; also, an alehouse.
Nall (n.) An awl.
Nam () Am not.
Nam () imp. of Nim.
Namable (a.) Capable of being named.
Namation (n.) A distraining or levying of a distress; an impounding.
Namaycush (n.) A large North American lake trout (Salvelinus namaycush). It is usually spotted with red, and sometimes weighs over forty pounds. Called also Mackinaw trout, lake trout, lake salmon, salmon trout, togue, and tuladi.
Expand Down
5 changes: 0 additions & 5 deletions WordisProject/Assets/Wordis/Resources/Dictionary/O.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,6 @@ Okenite (n.) A massive and fibrous mineral of a whitish color, chiefly hydrous s
Oker (n.) See Ocher.
Okra (n.) An annual plant (Abelmoschus, / Hibiscus, esculentus), whose green pods, abounding in nutritious mucilage, are much used for soups, stews, or pickles; gumbo.
Olay (n. pl.) Palm leaves, prepared for being written upon with a style pointed with steel.
Old (n.) Open country.
Old (superl.) Not young; advanced far in years or life; having lived till toward the end of the ordinary term of living; as, an old man; an old age; an old horse; an old tree.
Old (superl.) Not new or fresh; not recently made or produced; having existed for a long time; as, old wine; an old friendship.
Old (superl.) Formerly existing; ancient; not modern; preceding; original; as, an old law; an old custom; an old promise.
Expand Down Expand Up @@ -1509,9 +1508,6 @@ Oology (n.) The science of eggs in relation to their coloring, size, shape, and
Oolong (n.) A fragrant variety of black tea having somewhat the flavor of green tea.
Oomiac (n.) Alt. of Oomiak
Oomiak (n.) A long, broad boat used by the Eskimos.
Oon (a.) One.
Oones (adv.) Once.
Oop (v. t.) To bind with a thread or cord; to join; to unite.
Oopack (n.) Alt. of Oopak
Oopak (n.) A kind of black tea.
Oophore (n.) An alternately produced form of certain cryptogamous plants, as ferns, mosses, and the like, which bears antheridia and archegonia, and so has sexual fructification, as contrasted with the sporophore, which is nonsexual, but produces spores in countless number. In ferns the oophore is a minute prothallus; in mosses it is the leafy plant.
Expand Down Expand Up @@ -2011,7 +2007,6 @@ Oratory (n.) A place of orisons, or prayer; especially, a chapel or small room s
Oratory (n.) The art of an orator; the art of public speaking in an eloquent or effective manner; the exercise of rhetorical skill in oral discourse; eloquence.
Oratress (n.) A woman who makes public addresses.
Oratrix (n.) A woman plaintiff, or complainant, in equity pleading.
Orb (n.) A blank window or panel.
Orb (n.) A spherical body; a globe; especially, one of the celestial spheres; a sun, planet, or star.
Orb (n.) One of the azure transparent spheres conceived by the ancients to be inclosed one within another, and to carry the heavenly bodies in their revolutions.
Orb (n.) A circle; esp., a circle, or nearly circular orbit, described by the revolution of a heavenly body; an orbit.
Expand Down
50 changes: 0 additions & 50 deletions WordisProject/Assets/Wordis/Resources/Dictionary/S.csv
Original file line number Diff line number Diff line change
Expand Up @@ -5490,57 +5490,7 @@ Sestet (n.) The last six lines of a sonnet.
Sestetto (n.) A sestet.
Sestine (n.) See Sextain.
Sestuor (n.) A sestet.
Set (imp. & p. p.) of Set
Setting (p. pr. & vb. n.) of Set
Set (v. t.) To cause to sit; to make to assume a specified position or attitude; to give site or place to; to place; to put; to fix; as, to set a house on a stone foundation; to set a book on a shelf; to set a dish on a table; to set a chest or trunk on its bottom or on end.
Set (v. t.) Hence, to attach or affix (something) to something else, or in or upon a certain place.
Set (v. t.) To make to assume specified place, condition, or occupation; to put in a certain condition or state (described by the accompanying words); to cause to be.
Set (v. t.) To fix firmly; to make fast, permanent, or stable; to render motionless; to give an unchanging place, form, or condition to.
Set (v. t.) To cause to stop or stick; to obstruct; to fasten to a spot; hence, to occasion difficulty to; to embarrass; as, to set a coach in the mud.
Set (v. t.) To fix beforehand; to determine; hence, to make unyielding or obstinate; to render stiff, unpliant, or rigid; as, to set one's countenance.
Set (v. t.) To fix in the ground, as a post or a tree; to plant; as, to set pear trees in an orchard.
Set (v. t.) To fix, as a precious stone, in a border of metal; to place in a setting; hence, to place in or amid something which serves as a setting; as, to set glass in a sash.
Set (v. t.) To render stiff or solid; especially, to convert into curd; to curdle; as, to set milk for cheese.
Set (v. t.) To put into a desired position or condition; to adjust; to regulate; to adapt.
Set (v. t.) To put in order in a particular manner; to prepare; as, to set (that is, to hone) a razor; to set a saw.
Set (v. t.) To extend and bring into position; to spread; as, to set the sails of a ship.
Set (v. t.) To give a pitch to, as a tune; to start by fixing the keynote; as, to set a psalm.
Set (v. t.) To reduce from a dislocated or fractured state; to replace; as, to set a broken bone.
Set (v. t.) To make to agree with some standard; as, to set a watch or a clock.
Set (v. t.) To lower into place and fix solidly, as the blocks of cut stone in a structure.
Set (v. t.) To stake at play; to wager; to risk.
Set (v. t.) To fit with music; to adapt, as words to notes; to prepare for singing.
Set (v. t.) To determine; to appoint; to assign; to fix; as, to set a time for a meeting; to set a price on a horse.
Set (v. t.) To adorn with something infixed or affixed; to stud; to variegate with objects placed here and there.
Set (v. t.) To value; to rate; -- with at.
Set (v. t.) To point out the seat or position of, as birds, or other game; -- said of hunting dogs.
Set (v. t.) To establish as a rule; to furnish; to prescribe; to assign; as, to set an example; to set lessons to be learned.
Set (v. t.) To suit; to become; as, it sets him ill.
Set (v. t.) To compose; to arrange in words, lines, etc.; as, to set type; to set a page.
Set (v. i.) To pass below the horizon; to go down; to decline; to sink out of sight; to come to an end.
Set (v. i.) To fit music to words.
Set (v. i.) To place plants or shoots in the ground; to plant.
Set (v. i.) To be fixed for growth; to strike root; to begin to germinate or form; as, cuttings set well; the fruit has set well (i. e., not blasted in the blossom).
Set (v. i.) To become fixed or rigid; to be fastened.
Set (v. i.) To congeal; to concrete; to solidify.
Set (v. i.) To have a certain direction in motion; to flow; to move on; to tend; as, the current sets to the north; the tide sets to the windward.
Set (v. i.) To begin to move; to go out or forth; to start; -- now followed by out.
Set (v. i.) To indicate the position of game; -- said of a dog; as, the dog sets well; also, to hunt game by the aid of a setter.
Set (v. i.) To apply one's self; to undertake earnestly; -- now followed by out.
Set (v. i.) To fit or suit one; to sit; as, the coat sets well.
Set (a.) Fixed in position; immovable; rigid; as, a set line; a set countenance.
Set (a.) Firm; unchanging; obstinate; as, set opinions or prejudices.
Set (a.) Regular; uniform; formal; as, a set discourse; a set battle.
Set (a.) Established; prescribed; as, set forms of prayer.
Set (a.) Adjusted; arranged; formed; adapted.
Set (n.) The act of setting, as of the sun or other heavenly body; descent; hence, the close; termination.
Set (n.) That which is set, placed, or fixed.
Set (n.) A young plant for growth; as, a set of white thorn.
Set (n.) That which is staked; a wager; a venture; a stake; hence, a game at venture.
Set (n.) Permanent change of figure in consequence of excessive strain, as from compression, tension, bending, twisting, etc.; as, the set of a spring.
Set (n.) A kind of punch used for bending, indenting, or giving shape to, metal; as, a saw set.
Set (n.) A piece placed temporarily upon the head of a pile when the latter cannot be reached by the weight, or hammer, except by means of such an intervening piece.
Set (n.) A short steel spike used for driving the head of a nail below the surface.
Set (n.) A number of things of the same kind, ordinarily used or classed together; a collection of articles which naturally complement each other, and usually go together; an assortment; a suit; as, a set of chairs, of china, of surgical or mathematical instruments, of books, etc.
Set (n.) A number of persons associated by custom, office, common opinion, quality, or the like; a division; a group; a clique.
Set (n.) Direction or course; as, the set of the wind, or of a current.
Expand Down
Loading

0 comments on commit 9a27906

Please sign in to comment.