Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/assets/javascripts/angular/resources/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
this.entityIds = [];
this.teams = {};

var twoPlayerMatch = this.playerCount === 2;

for(var ei in this.entities) {
// console.log("ei", ei, this.armies_by_frame, this.entities, this.entities[ei].identity.name);
if (this.armies_by_frame && this.entities[ei].identity) {
Expand All @@ -255,6 +257,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
} else if (this.entities[ei].identity.id in this.armies_by_frame) {
entityArmy = this.armies_by_frame[this.entities[ei].identity.id];
// console.log("got abf for ei by id", ei, entityArmy);
} else if (this.entities[ei].identity.name.match(/A.I./) && twoPlayerMatch) {
entityArmy = this.armies_by_frame[0];
}
this.entities[ei].armies_by_frame = entityArmy;
}
Expand Down
4 changes: 3 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# SimpleCov is ..rcov for 1.9+
# https://github.com/colszowka/simplecov
require 'simplecov'
SimpleCov.start
SimpleCov.start do
add_filter "/spec/"
end

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
Expand Down