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
// Put all the words from the dictionary file in the database | |
public static void insertWords(List<string> wordList) | |
{ | |
OperationDataContext odContext = new OperationDataContext(); | |
int wordID = 0; | |
foreach (string word in wordList) | |
{ | |
english_dictionary dictionary = new english_dictionary(); |
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
public static void insertWord(string word) | |
{ | |
OperationDataContext odContext = new OperationDataContext(); | |
english_dictionary dictionary = new english_dictionary(); | |
dictionary.word = word; | |
dictionary.wordID = wordID++; | |
odContext.english_dictionaries.InsertOnSubmit(dictionary); | |
odContext.SubmitChanges(); |
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
private void Play(GameTime gameTime) | |
{ | |
// Allows user to enter words | |
KeyboardState keyboard = Keyboard.GetState(); | |
char pressedChar = KeyboardProcessor.GetLetter(keyboard); | |
if (pressedChar != ' ') | |
{ | |
// Check whether the letter is one of the falling ones | |
if (currentWord.Contains(pressedChar.ToString())) |
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
// WordStatistics.java | |
import java.util.*; | |
import java.io.*; | |
import java.util.regex.*; | |
enum Pronoun | |
{ | |
I ("I"), | |
YOU ("you"), | |
SHE ("she"), |
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
# Present Perfect Detector | |
# Written by Pawel Mrozik | |
import re | |
import time | |
from sets import Set | |
start_time = time.time() | |
past_participles = [] |