Skip to content
Open
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: 2 additions & 2 deletions TetrisDiffingCompetition/Tetris/Tetris.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ extension Tetromino {
}

func rotatedClockwise<T>(_ array: [[T]]) -> [[T]] {
let indices = (0..<array.count)
let indices = array.indices
return indices.map { y in indices.reversed().map { x in array[x][y] } }
}

func rotatedCounterClockwise<T>(_ array: [[T]]) -> [[T]] {
let indices = (0..<array.count)
let indices = array.indices
return indices.reversed().map { y in indices.map { x in array[x][y] } }
}

Expand Down