-
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.
All tests green; but attack processing (esp. Moat) only updated as far as necessary. Journals can now be hidden. This isn't used, but will be later for automoating. For #128
- Loading branch information
Showing
14 changed files
with
148 additions
and
126 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
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 |
---|---|---|
|
@@ -35,7 +35,7 @@ def fill(fields) | |
field = field.join(', ') | ||
end | ||
|
||
field | ||
field || "{{#{$1}}}" | ||
end | ||
end | ||
|
||
|
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 |
---|---|---|
|
@@ -40,7 +40,7 @@ def cost | |
end | ||
|
||
def empty? | ||
cards(true).count == 0 | ||
cards.count == 0 | ||
end | ||
|
||
def card_class | ||
|
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 |
---|---|---|
@@ -1,22 +1,23 @@ | ||
ul | ||
- @game.journals.each do |journal| | ||
li.journal class=classes_for_journal(journal, @player) | ||
- if journal.modified | ||
span.bold>[] (Edited) | ||
- if journal.player == @player && journal.order > @game.last_blocked_journal | ||
= best_in_place journal, :event, class: 'change_journal', other_fields: {game_id: @game.id}, html_attrs: {style: 'width: 100%', autocomplete: 'off'} | ||
- else | ||
span.immutable= journal.event | ||
-if journal.errors.any? | ||
ul.journal_errors.error | ||
- journal.errors.full_messages.each do |msg| | ||
li= msg | ||
- if journal.histories.any? | ||
ul.journal_histories | ||
- journal.histories.each do |history| | ||
- classes = history.css_class | ||
- if @player && history.css_class =~ /\bplayer#{@player.seat}\b/ | ||
- classes += ' self' | ||
li class=classes = format_history(history, @player) | ||
- if journal.order >= @game.last_blocked_journal | ||
span.insert data-order=journal.order+1 | ||
-if !journal.hidden || journal.modified | ||
li.journal class=classes_for_journal(journal, @player) | ||
- if journal.modified | ||
span.bold>[] (Edited) | ||
- if journal.player == @player && journal.order > @game.last_blocked_journal | ||
= best_in_place journal, :event, class: 'change_journal', other_fields: {game_id: @game.id}, html_attrs: {style: 'width: 100%', autocomplete: 'off'} | ||
- else | ||
span.immutable= journal.event | ||
-if journal.errors.any? | ||
ul.journal_errors.error | ||
- journal.errors.full_messages.each do |msg| | ||
li= msg | ||
- if journal.histories.any? | ||
ul.journal_histories | ||
- journal.histories.each do |history| | ||
- classes = history.css_class | ||
- if @player && history.css_class =~ /\bplayer#{@player.seat}\b/ | ||
- classes += ' self' | ||
li class=classes = format_history(history, @player) | ||
- if journal.order >= @game.last_blocked_journal | ||
span.insert data-order=journal.order+1 |
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,5 @@ | ||
class AddHiddenToJournals < ActiveRecord::Migration | ||
def change | ||
add_column :journals, :hidden, :boolean | ||
end | ||
end |
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.