mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-29 01:35:59 +00:00
Many more Rubocop-inspired code improvements
This commit is contained in:
@@ -611,7 +611,7 @@ class TriadScreen
|
||||
|
||||
def maxCards
|
||||
numcards = @width * @height
|
||||
if numcards % 2 == 1
|
||||
if numcards.odd?
|
||||
numcards = numcards / 2 + 1
|
||||
else
|
||||
numcards = numcards / 2
|
||||
@@ -833,7 +833,7 @@ class TriadScreen
|
||||
end
|
||||
end
|
||||
# Sort by number of flips
|
||||
scores.sort! { |a, b| (b[3] == a[3]) ? rand(3) - 1 : b[3] <=> a[3] }
|
||||
scores.sort! { |a, b| (b[3] == a[3]) ? rand(-1..1) : b[3] <=> a[3] }
|
||||
scores = scores[0, opponentCards.length] # Get the best results
|
||||
if scores.length == 0
|
||||
@scene.pbDisplay(_INTL("{1} can't move somehow...", @opponentName))
|
||||
|
||||
Reference in New Issue
Block a user