@@ 56,7 56,7 @@ data CurrencyType = PrefixCurrency Text
knownCurrencyPrefixes,knownCurrencySuffixes :: [Text]
knownCurrencyPrefixes = ["$", "¥", "£"]
-knownCurrencySuffixes = [" F"]
+knownCurrencySuffixes = [" F", "₽"]
parseLogEntries :: Monad m => Pipe Text LogEntry m (Either LogParserError a)
parseLogEntries = parseLogEntries' emptyParseState
@@ 208,6 208,7 @@ logEntry = (datestamp <|> (timestamp >> P.choice toplevelChoices)) <* P.eof
, P.try newPlayerPass
, P.try newCompanyFloat
, P.try newCompanyAvailableFromBank
+ , P.try newCompanyUpForAuction
, P.try newPlayerBuysCompany
, newPlayerChatMessage
]
@@ 353,6 354,12 @@ newCompanyAvailableFromBank :: Parser LogEntry
newCompanyAvailableFromBank =
newCompany " is now available for purchase from the Bank" >> pure InformationalMessage
+newCompanyUpForAuction :: Parser LogEntry
+newCompanyUpForAuction =
+ newCompany " is up for auction, minimum bid is "
+ >> dollars
+ >> pure InformationalMessage
+
companyReceivesSomething :: Company -> Parser LogEntry
companyReceivesSomething c = P.string " receives " >> P.choice
[ P.string "no mail income as it has no trains"
@@ 678,6 678,11 @@ spec = do
`shouldParseAsLogEntry`
InformationalMessage
+ it "parses InformationalMessage 20" $
+ "[10:54]yoyodyne is up for auction, minimum bid is $20"
+ `shouldParseAsLogEntry`
+ InformationalMessage
+
it "parses PlayerShareCompensation" $
"[12:17]kanye west receives $40 in share compensation"
`shouldParseAsLogEntry`