diff --git a/.idea/runConfigurations/Run_All_tests_in_Execise_5.xml b/.idea/runConfigurations/Run_All_tests_in_Execise_5.xml new file mode 100644 index 0000000..8282d0d --- /dev/null +++ b/.idea/runConfigurations/Run_All_tests_in_Execise_5.xml @@ -0,0 +1,26 @@ + + + + + + + false + true + false + true + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run_All_tests_in_Execise_7.xml b/.idea/runConfigurations/Run_All_tests_in_Execise_7.xml new file mode 100644 index 0000000..9b7e81f --- /dev/null +++ b/.idea/runConfigurations/Run_All_tests_in_Execise_7.xml @@ -0,0 +1,26 @@ + + + + + + + false + true + false + true + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run_All_tests_in_Execise_8.xml b/.idea/runConfigurations/Run_All_tests_in_Execise_8.xml new file mode 100644 index 0000000..5d4cf49 --- /dev/null +++ b/.idea/runConfigurations/Run_All_tests_in_Execise_8.xml @@ -0,0 +1,26 @@ + + + + + + + false + true + false + true + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run_Task_1__Test_TestSquareBoard.xml b/.idea/runConfigurations/Run_Task_1__Test_TestSquareBoard.xml new file mode 100644 index 0000000..c481e7a --- /dev/null +++ b/.idea/runConfigurations/Run_Task_1__Test_TestSquareBoard.xml @@ -0,0 +1,26 @@ + + + + + + + false + true + false + true + + + \ No newline at end of file diff --git a/.idea/runConfigurations/Run_Task_2__Test_GameBoard.xml b/.idea/runConfigurations/Run_Task_2__Test_GameBoard.xml new file mode 100644 index 0000000..05a153a --- /dev/null +++ b/.idea/runConfigurations/Run_Task_2__Test_GameBoard.xml @@ -0,0 +1,26 @@ + + + + + + + false + true + false + true + + + \ No newline at end of file diff --git a/README.md b/README.md index d35667d..bc7194a 100644 --- a/README.md +++ b/README.md @@ -1,16 +1 @@ -# Kotlin Programming Language Course - Faculty of Sciences, Novi Sad - -Welcome to the Kotlin Programming Language Course at the Faculty of Sciences, Novi Sad! - -## Project Overview - -This project contains a set of exercises designed to help you learn Kotlin programming concepts. Each exercise is provided with instructions and corresponding Kotlin files where you can implement your solutions. - -## How to Load Project from GitHub in IntelliJ IDEA - -### 1. Clone the Repository - -- Open IntelliJ IDEA. -- Go to `File` > `New` > `Project from Version Control` > `Git`. -- In the `URL` field, enter the URL of the GitHub repository: https://github.com/vuksa/kotlin-programming-language-course.git -- Click `Clone` to clone the repository to your local machine. \ No newline at end of file +bojan ludajic diff --git a/build.gradle.kts b/build.gradle.kts index bfd7c2a..464877d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -11,6 +11,7 @@ repositories { dependencies { testImplementation(kotlin("test")) + testImplementation("junit:junit:4.13") testImplementation("org.junit.jupiter:junit-jupiter-params:5.8.1") } diff --git a/src/main/kotlin/common/FileReader.kt b/src/main/kotlin/common/FileReader.kt new file mode 100644 index 0000000..04c81b6 --- /dev/null +++ b/src/main/kotlin/common/FileReader.kt @@ -0,0 +1,22 @@ +package common + +import java.nio.file.Path +import java.nio.file.Paths +import kotlin.io.path.readLines +import kotlin.io.path.toPath + +object FileReader { + /** + * Reads the contents of a file located at the specified path. + * + * @param path The path of the file to read. + * @return A list of strings representing the lines of the file. + * @throws NullPointerException if the resource at the specified path is null. + */ + fun readFileInResources(path: String): List { + val normalizedPath = path.takeIf { it.startsWith("/") } ?: "/$path" + return requireNotNull(this.javaClass.getResource(normalizedPath.toString())?.toURI()?.toPath()) { + "Unresolved path." + }.readLines() + } +} \ No newline at end of file diff --git a/src/main/kotlin/exercise2/task1/FindPairOfHighestSum.kt b/src/main/kotlin/exercise2/task1/FindPairOfHighestSum.kt index ddf425b..20b90c4 100644 --- a/src/main/kotlin/exercise2/task1/FindPairOfHighestSum.kt +++ b/src/main/kotlin/exercise2/task1/FindPairOfHighestSum.kt @@ -18,7 +18,10 @@ import org.jetbrains.exercise2.task3.findPairWithBiggestDifference */ internal fun List.findHighestSumPair(): Pair { - TODO("Implement me!!") + val prvi = this.sorted().get(this.lastIndex) + val drugi = this.sorted().get(this.lastIndex-1) + + return Pair(prvi, drugi) } fun main() { diff --git a/src/main/kotlin/exercise2/task2/FindPairOfHighestSumFunctional.kt b/src/main/kotlin/exercise2/task2/FindPairOfHighestSumFunctional.kt index b1527fa..011a463 100644 --- a/src/main/kotlin/exercise2/task2/FindPairOfHighestSumFunctional.kt +++ b/src/main/kotlin/exercise2/task2/FindPairOfHighestSumFunctional.kt @@ -20,7 +20,9 @@ import org.jetbrains.exercise2.task3.findPairWithBiggestDifference */ internal fun List.findHighestSumPairFunctional(): Pair { - TODO("Implement me!!") + return Pair( + this.sorted().get(this.lastIndex), this.sorted().get(this.lastIndex-1) + ) } fun main() { diff --git a/src/main/kotlin/exercise2/task3/ConvertMethodToFunctionalApproach.kt b/src/main/kotlin/exercise2/task3/ConvertMethodToFunctionalApproach.kt index 47f814b..7777af9 100644 --- a/src/main/kotlin/exercise2/task3/ConvertMethodToFunctionalApproach.kt +++ b/src/main/kotlin/exercise2/task3/ConvertMethodToFunctionalApproach.kt @@ -17,24 +17,29 @@ import kotlin.math.abs */ internal fun List.findPairWithBiggestDifference(): Pair { - // TODO refactor me to functional approach and make tests pass!!! - var resultPair: Pair? = null - var biggestDifference = Int.MIN_VALUE - - for (i in this.indices) { - for (j in (i + 1) until this.size) { - val first = this[i] - val second = this[j] - val absDifference = abs(first - second) - - if (absDifference >= biggestDifference) { - biggestDifference = absDifference - resultPair = Pair(first, second) - } - } - } - return resultPair!! + return Pair( + this.sorted().get(this.size-1), this.sorted().get(0) + ) + + +// var resultPair: Pair? = null +// var biggestDifference = Int.MIN_VALUE +// +// for (i in this.indices) { +// for (j in (i + 1) until this.size) { +// val first = this[i] +// val second = this[j] +// val absDifference = abs(first - second) +// +// if (absDifference >= biggestDifference) { +// biggestDifference = absDifference +// resultPair = Pair(first, second) +// } +// } +// } +// +// return resultPair!! } fun main() { diff --git a/src/main/kotlin/exercise2/task4/ProcessCountriesData.kt b/src/main/kotlin/exercise2/task4/ProcessCountriesData.kt index 291e558..474fb08 100644 --- a/src/main/kotlin/exercise2/task4/ProcessCountriesData.kt +++ b/src/main/kotlin/exercise2/task4/ProcessCountriesData.kt @@ -59,27 +59,35 @@ internal val countries = listOf( */ internal fun List.findCountryWithBiggestTotalArea(): Country { - TODO("Implement me!!!") + return countries.maxBy { it.totalAreaInSquareKilometers } } internal fun List.findCountryWithBiggestPopulation(): Country { - TODO("Implement me!!!") + return countries.maxBy { it.population } } internal fun List.findCountryWithHighestPopulationDensity(): Country { - TODO("Implement me!!!") + return countries.maxBy { + it.population/it.totalAreaInSquareKilometers + } } internal fun List.findCountryWithLowestPopulationDensity(): Country { - TODO("Implement me!!!") + return countries.minBy { + it.population/it.totalAreaInSquareKilometers + } } internal fun List.findLanguageSpokenInMostCountries(): String { - TODO("Implement me!!!") + return countries.flatMap { it.languages } + .groupingBy { it } + .eachCount() + .maxBy { it.value } + .key } internal fun List.filterCountriesThatSpeakLanguage(language: String): List { - TODO("Implement me!!!") + return countries.filter { country -> country.languages.contains(language) } } @@ -88,7 +96,7 @@ fun main() { println("Country with a biggest population is a ${countries.findCountryWithBiggestPopulation().name}") println("Country with a biggest population density is a ${countries.findCountryWithHighestPopulationDensity().name}") println("Country with a lowest population density is a ${countries.findCountryWithLowestPopulationDensity().name}") - println("Language spoken in most countries is a ${countries.findLanguageSpokenInMostCountries()}") + println("Language spoken in most countries is ${countries.findLanguageSpokenInMostCountries()}") val countriesThatSpeakEnglish = countries.filterCountriesThatSpeakLanguage("English") println("Countries that speak English language are ${countriesThatSpeakEnglish.joinToString { it.name }}") } diff --git a/src/main/kotlin/exercise2/task5/CreateUserDSL.kt b/src/main/kotlin/exercise2/task5/CreateUserDSL.kt index 855c0cb..e86fa5c 100644 --- a/src/main/kotlin/exercise2/task5/CreateUserDSL.kt +++ b/src/main/kotlin/exercise2/task5/CreateUserDSL.kt @@ -49,11 +49,15 @@ internal data class Address( */ internal fun user(initUser: User.() -> Unit): User { - TODO("Implement me!!!") + val user = User() + return user.apply(initUser) } -internal fun User.address(initAddress: Address.() -> Unit): User { - TODO("Implement me!!!") +internal fun User.address (initAddress: Address.() -> Unit): User { + val adr = Address() + adr.initAddress() + this.address = adr + return this } fun main() { diff --git a/src/main/kotlin/exercise3/task1/BalancedBrackets.kt b/src/main/kotlin/exercise3/task1/BalancedBrackets.kt index 7a6958d..86ae111 100644 --- a/src/main/kotlin/exercise3/task1/BalancedBrackets.kt +++ b/src/main/kotlin/exercise3/task1/BalancedBrackets.kt @@ -1,4 +1,5 @@ package exercise3.task1 +import java.util.Stack /** * Task1: Balanced Brackets (Parentheses) Problem @@ -26,9 +27,32 @@ package exercise3.task1 internal fun isExpressionBalanced(expression: String): Boolean { - TODO("Implement me!!!") + val chars = Stack() + val opening = "({[" + val closing = ")}]" + + for(char in expression) { + when { + char in opening -> chars.add(char) + char in closing -> { + if(chars.isEmpty() || !valid(chars.lastElement(), char)) { + return false + } + chars.removeLast() + } + } + } + return chars.isEmpty() } +fun valid(opening: Char, closing: Char): Boolean { + return (opening == '(' && closing == ')') || + (opening == '[' && closing == ']') || + (opening == '{' && closing == '}') +} + + + fun main() { val expressions = listOf( "{[()]}" to true, diff --git a/src/main/kotlin/exercise3/task2/ParenthesesClusters.kt b/src/main/kotlin/exercise3/task2/ParenthesesClusters.kt index 0e75083..b7945dd 100644 --- a/src/main/kotlin/exercise3/task2/ParenthesesClusters.kt +++ b/src/main/kotlin/exercise3/task2/ParenthesesClusters.kt @@ -24,7 +24,45 @@ package exercise3.task2 */ internal fun String.splitToBracketsClusters(): List { - TODO("Implement me!!!") + val opening = "({[" + val closing = ")}]" + val clusterList = ArrayList() + val emptyList = ArrayList() + + var start = 0 + var counter = 0 + var balanced = true + + for(i in this.indices) { + when (this[i]) { + '(' -> { + counter++ + if (counter == 1) { + start = i + } + } + + ')' -> { + counter-- + if (counter == 0) { + clusterList.add(this.substring(start, i + 1)) + } else if (counter < 0) { + balanced = false + } + } + } + } + + if(counter != 0) { + balanced = false + } + + if(balanced) { + return clusterList + } + else { + return emptyList + } } fun main() { diff --git a/src/main/kotlin/exercise3/task3/SherlockValidatesString.kt b/src/main/kotlin/exercise3/task3/SherlockValidatesString.kt index 55680b8..4fe8f91 100644 --- a/src/main/kotlin/exercise3/task3/SherlockValidatesString.kt +++ b/src/main/kotlin/exercise3/task3/SherlockValidatesString.kt @@ -29,7 +29,24 @@ package exercise3.task3 */ internal fun isSherlockValid(s: String): String { - TODO("Implement me!!!") + val charCounts = s.groupBy { it }.values.map { it.size } + + if (charCounts.toSet().size == 1) { + return "YES" + } + + if (charCounts.toSet().size == 2) { + val minFreq = charCounts.minOrNull() ?: return "NO" + val maxFreq = charCounts.maxOrNull() ?: return "NO" + val minFreqCounter = charCounts.count { it == minFreq } + val maxFreqCounter = charCounts.count { it == maxFreq } + + if ((minFreq == 1 && minFreqCounter == 1) || (maxFreq - minFreq == 1 && maxFreqCounter == 1)) { + return "YES" + } + } + + return "NO" } fun main() { diff --git a/src/main/kotlin/exercise3/task4/TaxiParkTask.kt b/src/main/kotlin/exercise3/task4/TaxiParkTask.kt index 0dfe831..31f9b7c 100755 --- a/src/main/kotlin/exercise3/task4/TaxiParkTask.kt +++ b/src/main/kotlin/exercise3/task4/TaxiParkTask.kt @@ -10,15 +10,20 @@ package exercise3.task4 * Find all the drivers who performed no trips. */ internal fun TaxiPark.findFakeDrivers(): Set { - TODO("Implement me!!!") + return allDrivers.minus(this.trips.map { it.driver }.toSet()) } -/** + /** * Subtask 2: * Find all the clients who completed at least the given number of trips. */ internal fun TaxiPark.findFaithfulPassengers(minTrips: Int): Set { - TODO("Implement me!!!") + return this.trips + .flatMap { it.passengers } + .groupingBy { it } + .eachCount() + .filter { it.value >= minTrips } + .keys } /** @@ -26,7 +31,13 @@ internal fun TaxiPark.findFaithfulPassengers(minTrips: Int): Set { * Find all the passengers, who were taken by a given driver more than once. */ internal fun TaxiPark.findFrequentPassengers(driver: Driver): Set { - TODO("Implement me!!!") + return this.trips + .filter { it.driver == driver } + .flatMap { it.passengers } + .groupingBy { it } + .eachCount() + .filter { it.value > 1} + .keys } /** @@ -34,5 +45,9 @@ internal fun TaxiPark.findFrequentPassengers(driver: Driver): Set { * Find the passengers who had a discount for the majority of their trips. */ internal fun TaxiPark.findSmartPassengers(): Set { - TODO("Implement me!!!") + return allPassengers.filter { passenger -> + val eachPassengerTrips = trips.filter { it.passengers.contains(passenger) } + val discountedTripsCount = eachPassengerTrips.count { it.discount != null } + discountedTripsCount > eachPassengerTrips.size / 2 + }.toSet() } diff --git a/src/main/kotlin/exercise4/task1/BankAccount.kt b/src/main/kotlin/exercise4/task1/BankAccount.kt new file mode 100644 index 0000000..7e35b82 --- /dev/null +++ b/src/main/kotlin/exercise4/task1/BankAccount.kt @@ -0,0 +1,77 @@ +package exercise4.task1 + +/** + * Bank Account Assignment + * + * Objective: + * Implement a simple Bank Account system using Kotlin and Object-Oriented Programming principles. + * + * Requirements: + * 1. Create a [BankAccount] class with the following attributes: + * - [accountNumber]: a unique identifier for each bank account. + * - [accountHolderName]: name of the account holder. + * - [balance]: current balance in the account. + * + * 2. Implement the following methods in the [BankAccount] class: + * - [deposit]: adds the specified amount to the account balance. + * - [withdraw]: deducts the specified amount from the account balance if sufficient funds are available, + * returns `true` if the transaction was successful, `false` otherwise. + * - [getBalance]: returns the current balance of the account. + * - [displayAccountInfo]: prints out the account information including account number, account holder name, and current balance. + * - Information should be printed in the following format: + * ``` + * Account Holder: [ACCOUNT_HOLDER_NAME] + * Account Number: [ACCOUNT_NUMBER] + * Balance: [ACCOUNT_BALANCE] + * ``` + * 3. Ensure that withdrawal is only allowed if the withdrawal amount is less than or equal to the current balance. + * + * 4. Create two class constructors: + * - One constructor accepts the account holder name, account holder number, and initial balance. + * - The second constructor accepts only the account holder name and account holder number. + * The initial balance for this constructor should always be set to 0. + */ + + +fun main() { + // Creating a Bank Account + val account = BankAccount("123456789", "John Doe") + + // Displaying account information + account.displayAccountInfo() + + // Depositing some money + account.deposit(1000) + + // Withdrawing some money + account.withdraw(500) + + // Displaying updated account information + account.displayAccountInfo() +} + +data class BankAccount( + val accountNumber: String, + val accountHolderName: String, + var balance: Int +) { + constructor( accountNumber: String, accountHolderName: String): this(accountNumber, accountHolderName, 0) + + fun displayAccountInfo() { + println(accountHolderName) + println(accountNumber) + println(balance) + } + + fun deposit(amount: Int) { + balance += amount + } + + fun withdraw(amount: Int) { + if(balance >= amount) { + balance -= amount + } + } + + +} diff --git a/src/main/kotlin/exercise4/task2/TransactionalBankAccount.kt b/src/main/kotlin/exercise4/task2/TransactionalBankAccount.kt new file mode 100644 index 0000000..d1cf6f4 --- /dev/null +++ b/src/main/kotlin/exercise4/task2/TransactionalBankAccount.kt @@ -0,0 +1,107 @@ +package exercise4.task2 + +import java.time.LocalDateTime +import java.time.format.DateTimeFormatter +import java.util.* + +/** + * Transactional Bank Account Assignment + * + * Objective: + * Implement a Transactional Bank Account system using Kotlin and Object-Oriented Programming principles. + * Transactional Bank Account should extend [exercise4.task1.BankAccount] from exercise4.task1 and add capability to record + * all transactions made with the account. + * + * 1. Create [TransactionalBankAccount] class which **extends** [exercise4.task1.BankAccount] class, + * and adds capability to record transaction on every deposit or withdrawal. + * + * 2. Transaction has the following attributes: + * - [transactionDate]: a date [LocalDateTime] when the transaction was made. + * - [transactionType]: a type of transaction can be [DEPOSIT] or [WITHDRAWAL]. Modeled as an enum. + * - [amount]: the amount that was deposited / withdrawn from the balance of the account. + * - [oldBalance]: the balance of the account before the transaction. + * - [newBalance]: the balance of the account after the transaction. + * - [transactionStatus] - status of transaction. [SUCCESS] if it was successful, [FAILURE] otherwise. Modeled as an enum. + * + * 3. Implement the following methods in [TransactionalBankAccount] class: + * - [deposit]: adds the specified amount to the account balance + * and records [DEPOSIT] transaction with a current time, amount and status. + * - [withdraw]: deducts the specified amount from the account balance if sufficient funds are available, + * returns [true] of transaction was successful [false] otherwise. + * In addition to this, it records [WITHDRAWAL] transaction with a current time, + * amount and [SUCCESS] status if the transaction was successful. Otherwise, transaction should have [FAILURE] status. + * - [getBalance]: returns the current balance of the account. + * - [getAllTranactions]: returns the list of all transactions sorted descending by transaction time. + * - [getAllTransactionsBy(predicate: (Transaction) -> Boolean)]: returns the list of all transactions that satisfy the provided predicate, + * sorted descending by transaction time. + * - [getTransactionsBetween(startDate: LocalDateTime, endDate: LocalDateTime)]: returns the list of transactions + * that occurred between the specified start and end dates, sorted descending by transaction time. + * - [getAllFailedTransactions]: returns the list of all transactions with a [FAILURE] status, sorted descending by transaction time. + * - [getAllSuccessfulTransactions]: returns the list of all transactions with a [SUCCESS] status, sorted descending by transaction time. + * - [getAllFailedDeposits]: returns the list of all failed deposit transactions, sorted descending by transaction time. + * - [getAllFailedWithdrawals]: returns the list of all failed withdrawal transactions, sorted descending by transaction time. + * - [getAllSuccessfulDeposits]: returns the list of all successful deposit transactions, sorted descending by transaction time. + * - [getAllSuccessfulWithdrawals]: returns the list of all successful withdrawal transactions, sorted descending by transaction time. + * + * 4. [TransactionalBankAccount] class should override the [displayAccountInfo] method to include transaction details. + * - Information should be printed in the following format: + * ``` + * Account Holder: [ACCOUNT_HOLDER_NAME] + * Account Number: [ACCOUNT_NUMBER] + * Balance: [ACCOUNT_BALANCE] + * + * Transactions: + * + * Transaction Date: [PRETTY_FORMATED_TRANSACTION_DATE] + * Transaction Type: [TRANSACTION_TYPE] + * Amount: [TRANSACTION_AMOUNT] + * Old Balance: [OLD_BALANCE] + * New Balance: [NEW_BALANCE] + * Status: [TRANSACTION_STATUS] + * + * Transaction Date: [PRETTY_FORMATED_TRANSACTION_DATE] + * Transaction Type: [TRANSACTION_TYPE] + * Amount: [TRANSACTION_AMOUNT] + * Old Balance: [OLD_BALANCE] + * New Balance: [NEW_BALANCE] + * Status: [TRANSACTION_STATUS] + * ``` + * If there is no transaction information should be printed as following: + * ``` + * Account Holder: [ACCOUNT_HOLDER_NAME] + * Account Number: [ACCOUNT_NUMBER] + * Balance: [ACCOUNT_BALANCE] + * + * Transactions: + * + * No transactions recorded. + * ``` + */ + + + + +private val currentTime: LocalDateTime get() = LocalDateTime.now() + +private fun LocalDateTime.prettyPrint(): String { + val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm") + return this.format(formatter) +} + +fun main() { + println(currentTime.prettyPrint()) + // Creating a Transactional Bank Account +// val account = TransactionalBankAccount("123456789", "John Doe") + + // Displaying account information +// account.displayAccountInfo() + + // Depositing some money +// account.deposit(1000.0) + + // Withdrawing some money +// account.withdraw(500.0) + + // Displaying updated account information +// account.displayAccountInfo() +} diff --git a/src/main/kotlin/exercise5/Board.kt b/src/main/kotlin/exercise5/Board.kt new file mode 100644 index 0000000..86934ee --- /dev/null +++ b/src/main/kotlin/exercise5/Board.kt @@ -0,0 +1,41 @@ +package exercise5 + +data class Cell(val i: Int, val j: Int) { + override fun toString()= "($i, $j)" +} + +enum class Direction { + UP, DOWN, RIGHT, LEFT; + + fun reversed() = when (this) { + UP -> DOWN + DOWN -> UP + RIGHT -> LEFT + LEFT -> RIGHT + } +} + +interface SquareBoard { + val width: Int + + fun getCellOrNull(i: Int, j: Int): Cell? + fun getCell(i: Int, j: Int): Cell + + fun getAllCells(): Collection + + fun getRow(i: Int, jRange: IntProgression): List + fun getColumn(iRange: IntProgression, j: Int): List + + fun Cell.getNeighbour(direction: Direction): Cell? +} + +interface GameBoard : SquareBoard { + + operator fun get(cell: Cell): String? + operator fun set(cell: Cell, value: String?) + + fun filter(predicate: (String?) -> Boolean): Collection + fun find(predicate: (String?) -> Boolean): Cell? + fun any(predicate: (String?) -> Boolean): Boolean + fun all(predicate: (String?) -> Boolean): Boolean +} diff --git a/src/main/kotlin/exercise5/BoardImpl.kt b/src/main/kotlin/exercise5/BoardImpl.kt new file mode 100644 index 0000000..03ebb1f --- /dev/null +++ b/src/main/kotlin/exercise5/BoardImpl.kt @@ -0,0 +1,68 @@ +package exercise5 + +import javax.sql.rowset.serial.SQLOutputImpl + +// TODO Instantiate SquareBoard +fun createSquareBoard(width: Int): SquareBoard { + return SquareBoardImpl(width) +} + + + +// TODO Instantiate GameBoard +fun createGameBoard(width: Int): GameBoard = TODO("GameBoardImpl(width)") + +// TODO Implement SquareBoard Interface +class SquareBoardImpl(size: Int) : SquareBoard { + private val board: List> = List(size) { x -> + List(size) { y -> + Cell(x + 1, y + 1) + } + } + override val width: Int + get() = this.width + + override fun getCellOrNull(i: Int, j: Int): Cell? { + return board.getOrNull(i - 1)?.getOrNull(j - 1) + } + + override fun getCell(i: Int, j: Int): Cell { + return board [i - 1][j - 1] + } + + override fun getAllCells(): Collection { + return board.flatten() + } + + override fun getRow(i: Int, jRange: IntProgression): List { + return jRange.map { item -> + board[i - 1][item - 1] + } + } + + override fun getColumn(iRange: IntProgression, j: Int): List { + return iRange.map { item -> + board[item - 1][j - 1] + } + } + + override fun Cell.getNeighbour(direction: Direction): Cell? { + return when(direction) { + Direction.UP -> -1 to 0 + Direction.DOWN -> 1 to 0 + Direction.RIGHT -> 0 to 1 + Direction.LEFT -> 0 to -1 + }.let { (xOffset, yOffset) -> + getCellOrNull(i + xOffset, j + yOffset) + } + } + +} + +// TODO extend SquareBoardImpl and implement GameBoard interface +class GameBoardImpl(size: Int) + +fun main() { + var Board = createSquareBoard(2) + println(Board.getAllCells()) +} \ No newline at end of file diff --git a/src/main/kotlin/exercise5/task.md b/src/main/kotlin/exercise5/task.md new file mode 100644 index 0000000..3635703 --- /dev/null +++ b/src/main/kotlin/exercise5/task.md @@ -0,0 +1,63 @@ +## Board + +Your task is to implement interfaces `SquareBoard` and `GameBoard`. + +#### SquareBoard + +SquareBoard stores the information about the square board and all the cells on it. +It allows the retrieval of a cell by its indexes, parts of columns and rows on a board, +or a specified neighbor of a cell. + +Note that the numbering of cells starts with 1 (not 0). + +A board of width two consists of the following cells: +``` +(1, 1) (1, 2) +(2, 1) (2, 2) +``` + +For the following examples, we'll use this board of width 2: +``` +val board = createSquareBoard(2) +``` + +If you call `board.getCellOrNull(3, 3)` for such a board, you'll get `null` as +the result, because the board doesn't have a cell with such coordinates. +The function `Board.getCell` should throw `IllegalArgumentException` for +incorrect values of `i` and `j`. + +You can write `board.getRow(1, 1..2)` or `board.getRow(1, 2 downTo 1)`, +and you'll get the lists of cells `[(1, 1), (1, 2)]` and `[(1, 2), (1, 1)]` +accordingly. + +Note how using the range `2 downTo 1` returns a row in a reversed order. +You can use any range to get a part of a column or a row. + +Note that `getRow` and `getColumn` should return a list containing only +the cells that belong to the board if the range is larger than the board limits +and ignore other indexes, +thus, `board.getRow(1, 1..10)` should return `[(1, 1), (1, 2)]`. + +The neighbors of a cell `(1, 1)`, depending on the direction should be: +``` +Direction.UP - null +Direction.LEFT - null +Direction.DOWN - (2, 1) +Direction.RIGHT - (1, 2) +``` + +Create only `width * width` cells; all the functions working with cells +should return existing cells instead of creating new ones. + +#### GameBoard + +GameBoard allows you to store values in board cells, update them, +and enquire about stored values (like `any`, +`all` etc.) +Note that GameBoard extends SquareBoard. + +Don't store a value in a `Cell`: data class `Cell` is intended to be immutable +and only store the coordinates. +You can store values separately, for instance, in a map from `Cell` to stored values type. + +See `TestSquareBoard` and `TestGameBoard` for examples. \ No newline at end of file diff --git a/src/main/kotlin/exercise6/task1/SimpleGenerics.kt b/src/main/kotlin/exercise6/task1/SimpleGenerics.kt new file mode 100644 index 0000000..d0a2872 --- /dev/null +++ b/src/main/kotlin/exercise6/task1/SimpleGenerics.kt @@ -0,0 +1,51 @@ +package exercise6.task1 + +/** + * Task1: Simple Generic Class + * + * In this task, you need to add a type parameter into a simple class TreeNode that represents + * a node of a binary tree holding a value of a user-defined class. + * Code that creates nodes passing instances of Person and Decision classes, + * and tries to access their properties, fails to compile because the value type in the node is declared as Any. + * + * Once the type argument is introduced, the code of printNodes function will become compilable without additional changes. + */ + +/** + * A binary tree node that holds some value. + */ +private data class TreeNode(val value: T) { + var left: TreeNode? = null + var right: TreeNode? = null +} + +/** + * Person objects are supposed to serve as values in a genealogical binary tree. + */ +private data class Person(val name: String, val birthYear: Int, val nick: String? = null) + +/** + * Decision objects are supposed to serve as values in a decision tree. + */ +private data class Decision(val question: String, val answerLeft: String, val answerRight: String) + + +/** + * In this function, we create the root nodes of two binary trees, one with Person value and another with + * Decision value. This code is not yet compilable, but it will become compilable as soon as you make a generic + * TreeNode class. + */ +private fun printNodes(): String { + // PLEASE DON'T CHANGE THE CODE OF THIS FUNCTION. + val richardI = Person("Richard I", 1157, "The Lionheart") + val genealogyTree = TreeNode(richardI) + + val decisionI = Decision("Do you choose a red or a blue pill?", "Red", "Blue") + val decisionTree = TreeNode(decisionI) + + return "${genealogyTree.value.name} ${decisionTree.value.answerLeft}" +} + +fun main() { + println(printNodes()) +} \ No newline at end of file diff --git a/src/main/kotlin/exercise6/task2/UpperBoundConstraints.kt b/src/main/kotlin/exercise6/task2/UpperBoundConstraints.kt new file mode 100644 index 0000000..788dd5d --- /dev/null +++ b/src/main/kotlin/exercise6/task2/UpperBoundConstraints.kt @@ -0,0 +1,45 @@ +package exercise6.task2 + +/** + * Task 2: The Upper-Bound Constraints + * + * In this task, you need to add a constraint to the generic type parameter of function calculateTreeCost, + * so that the function body becomes compilable. The function calculates a sum of costs of all tree nodes, + * and we want to be able to call it with trees holding values of a different type. + * + * Once the type constraint is introduced, the code of calculateTreeCost function will become compilable. + */ + +/** + * A binary tree node that holds some value. + */ +private data class TreeNode(val value: T) { + var left: TreeNode? = null + var right: TreeNode? = null +} + +/** + * Objects that implement this interface will have a cost property. + */ +private interface CostElement { + var cost: Double +} + +/** + * The node is a set intersection if its left and right children are not null. Otherwise, it is + * just a set of some values. The cost is an estimated cost of calculating the intersection. + */ +private data class SetIntersection(val size: Int): CostElement { + override var cost: Double = size.toDouble() +} + +/** + * In this generic function we traverse the tree and calculate the total cost of traversing as the sum of costs at all + * nodes. This code is not yet compilable, but it will become compilable as soon as you add an upper bound to the generic + * type. + */ +private fun calculateTreeCost(root: TreeNode): Double { + return root.value.cost + + (root.left?.let { calculateTreeCost(it) } ?: 0.0) + + (root.right?.let { calculateTreeCost(it) } ?: 0.0) +} \ No newline at end of file diff --git a/src/main/kotlin/exercise6/task3/UpperBoundConstraintPartTwo.kt b/src/main/kotlin/exercise6/task3/UpperBoundConstraintPartTwo.kt new file mode 100644 index 0000000..79c99bc --- /dev/null +++ b/src/main/kotlin/exercise6/task3/UpperBoundConstraintPartTwo.kt @@ -0,0 +1,69 @@ +package exercise6.task3 + +/** + * Task 3: Upper-Bound Constraints II + * + * In this task, you need to add a constraint to the generic type parameter of function estimateIntersectionSize, + * so that the function body becomes compilable. The function estimates the size of the intersection of + * two sets of values by comparing the upper and lower bounds of values in both sets. + * The function will work only if the value type supports total ordering, and the task is to specify this constraint. + * A tricky part is the expected upper bound itself is a generic interface, and its type parameter will be exactly + * the same as the function type parameter, that is, the type parameter becomes recursive. + * + * Once the type constraint is introduced, the code of estimateIntersectionSize function will become compilable. + */ + +/** + * A binary tree node that holds some value. + */ +private data class TreeNode(val value: T) { + var left: TreeNode? = null + var right: TreeNode? = null +} + +/** + * Objects that implement this interface will have a cost property. + */ +interface CostElement { + var cost: Double +} + +/** + * Set intersection objects are supposed to serve as values in a tree that represents the plan of calculation + * the optimal way to find an intersection of N sets. + * + * This object is an intersection of two sets if its left and right children in the tree are not null. + * Otherwise, it is just an initial set of some values. The cost is an estimated cost of calculating the intersection + * of two child sets. + */ +private data class SetIntersection(val size: Int, val lowerBound: S?, val upperBound: S?): CostElement { + override var cost: Double = size.toDouble() +} + +/** + * This function estimates the size of intersection of two sets. + * + * If the input tree node is a leaf node (any of its child nodes is null) then it returns the node value. + * + * Otherwise, it compares the upper and lower bounds of two child sets and returns 0 if it turns out that the sets have + * no intersection at all. If the intersection is likely to be not empty, it estimates the intersection size as the mean + * of the set sizes. + */ +private fun > estimateIntersectionSize(treeNode: TreeNode>): Int { + val leftNode = treeNode.left ?: return treeNode.value.size + val rightNode = treeNode.right ?: return treeNode.value.size + + if (leftNode.value.lowerBound == null || rightNode.value.lowerBound == null) { + return 0 + } + if (leftNode.value.upperBound == null || rightNode.value.upperBound == null) { + return 0 + } + + + if (leftNode.value.upperBound < rightNode.value.lowerBound || leftNode.value.lowerBound > rightNode.value.upperBound) { + return 0 + } + return (leftNode.value.size + rightNode.value.size)/2 +} + diff --git a/src/main/kotlin/exercise6/task4/UpperBoundConstraintPartThree.kt b/src/main/kotlin/exercise6/task4/UpperBoundConstraintPartThree.kt new file mode 100644 index 0000000..f1e3767 --- /dev/null +++ b/src/main/kotlin/exercise6/task4/UpperBoundConstraintPartThree.kt @@ -0,0 +1,159 @@ +package exercise6.task4 + +/** + * Task 4" Upper-Bound Constraints III + * + * In this task, we still want to add a constraint to the generic type parameters of function estimateIntersectionSize, + * so that the function body became compilable. However, the difference is that now the function argument is a tree node + * that contains a value of a generic type, not necessarily a SetIntersection instance. + * Type parameter constraints should combine a few interfaces that the values in the tree nodes are supposed to implement. + * We will use a where keyword to define the constraints. + * + * Once the type constraint is introduced, the code of estimateIntersectionSize + * function will become compilable without additional changes. + * + * Also, you need to add a simple type constraint into printTree function so that it could traverse and + * print trees composed of the values of different types, e.g., SetIntersection and Decision. + */ + +/** + * A binary tree node that holds some user-defined value. + */ +private data class TreeNode(val value: T) { + var left: TreeNode? = null + var right: TreeNode? = null +} + +/** + * This is an element of the cost function that shows the cost of intersecting a few sets. + */ +private interface CostElement { + var cost: Double +} + +/** + * This is a range of comparable values. The object that implements this interface holds the values in + * [lowerBound ... upperBound] range. Null value in the lower-bound stands for "minus infinity", and null + * value in the upper-bound stands for "plus infinity". + */ +private interface Range> { + val lowerBound: T? + val upperBound: T? +} + +/** + * The object that implements this interface allows for measuring its size. + */ +private interface Measurable { + val size: Int +} + + +/** + * Person objects are supposed to serve as values in a genealogical binary tree. + */ +private data class Person(val name: String, val birthYear: Int, val nick: String? = null) + +/** + * Decision objects are supposed to serve as values in a decision tree. The cost is the cost of taking the decision. + */ +private data class Decision(val question: String, val answerLeft: String, val answerRight: String): CostElement { + override var cost: Double = 0.0 +} + +/** + * Set intersection objects are supposed to serve as values in a tree that represents the plan of calculation + * the optimal way to find an intersection of N sets. + * + * This object is an intersection of two sets, if its left and right children in the tree are not null. + * Otherwise, it is just an initial set of some values. The cost is an estimated cost of calculating the intersection + * of two child sets, and the size is the estimated size of the intersection. + * Upper and lower bounds are generic values that indicate the upper and lower bounds of the entire set. + */ +private data class SetIntersection>( + override val size: Int, + override val lowerBound: T?, + override val upperBound: T?) + : Measurable, CostElement, Range { + + override var cost: Double = 0.0 +} + + +/** + * This function estimates the size of intersection of two sets. + * + * If the input tree node is a leaf node (any of its child nodes is null) then it returns the node value. + * + * Otherwise, it compares the upper and lower bounds of two child sets and returns 0 if it turns out that the sets have + * no intersection at all. If the intersection is likely to be not empty, it estimates the intersection size as the mean + * of the set sizes. + */ +private fun estimateIntersectionSize(treeNode: TreeNode) : Int where T: Range, T: Measurable, S: Comparable { + val leftNode = treeNode.left ?: return treeNode.value.size + val rightNode = treeNode.right ?: return treeNode.value.size + + if (leftNode.value.lowerBound == null || rightNode.value.lowerBound == null) { + return 0 + } + if (leftNode.value.upperBound == null || rightNode.value.upperBound == null) { + return 0 + } + + if (leftNode.value.upperBound!! < rightNode.value.lowerBound!! || leftNode.value.lowerBound!! > rightNode.value.upperBound!!) { + return 0 + } + return (leftNode.value.size + rightNode.value.size)/2 +} + +private fun printTree(treeNode: TreeNode) { + println("${treeNode.value} cost:${treeNode.value.cost}") + treeNode.left?.let { printTree(it) } + treeNode.right?.let { printTree(it) } +} + +/** + * In this generic function we traverse the tree and calculate the total cost of traversing as the sum of costs at all + * nodes. This code is not yet compilable, but it will become compilable as soon as you add an upper bound to the generic + * type. + */ +private fun calculateTreeCost(root: TreeNode): Double { + // PLEASE DON'T CHANGE THE CODE OF THIS FUNCTION. + return root.value.cost + + (root.left?.let { calculateTreeCost(it) } ?: 0.0) + + (root.right?.let { calculateTreeCost(it) } ?: 0.0) +} + +/** + * In this function we create the root nodes of two binary trees, one with Person value and another with + * Decision value. This code is not yet compilable, but it will become compilable as soon as you make a generic + * TreeNode class. + */ +private fun printNodes(): String { + // PLEASE DON'T CHANGE THE CODE OF THIS FUNCTION. + val richardI = Person("Richard I", 1157, "The Lionheart") + val genealogyTree = TreeNode(richardI) + + val decisionI = Decision("Do you choose a red or a blue pill?", "Red", "Blue") + val decisionTree = TreeNode(decisionI) + return "${genealogyTree.value.name} ${decisionTree.value.answerLeft} cost: ${calculateTreeCost(decisionTree)}" +} + +private fun run() { + val leftNode = TreeNode(SetIntersection(10, 5, 15)) + val rightNode = TreeNode(SetIntersection(20, 10, 30)) + val rootNode = TreeNode(SetIntersection(-1, null, null)).also { + it.left = leftNode + it.right = rightNode + } + + val intersectionSize = estimateIntersectionSize(rootNode) + println(intersectionSize) + + printTree(rootNode) + printNodes() +} + +fun main() { + run() +} \ No newline at end of file diff --git a/src/main/kotlin/exercise6/taskProjections/task1/Task.kt b/src/main/kotlin/exercise6/taskProjections/task1/Task.kt new file mode 100644 index 0000000..b4114b3 --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task1/Task.kt @@ -0,0 +1,65 @@ +package exercise6.taskProjections.task1 + +import kotlin.math.exp + +/** + * Task: Projections #1 + * In this task, you need to work with projections. + * First of all, you need to make it possible to create different types of MailBox. + * Then, you need to modify code somehow to be able to create topRatedPostman and juniorPostman: + * - The topRatedPostman can send ONLY express postcards + * - The juniorPostman can send both regular and express postcards + + +**/ + +interface Sender { + fun send(item: T) +} + +class MailBox(private var box: T? = null): Sender { + override fun send(item: T) { + printCurrentBoxState() + println("Sending the box: $item!") + box = item + } + + private fun printCurrentBoxState() { + if (box != null) { + println("I have a box: $box!") + } else { + println("I have nothing") + } + } + +} + +class Postman(private val mailboxes: List>): Sender { + override fun send(item: T) { + mailboxes.forEach { it.send(item) } + } + +} +interface Delivery + +open class Postcard(open val origin: String) : Delivery + +data class ExpressPostcard(val priceEuro: Int, override val origin: String) : Postcard(origin) + +fun main() { + val postcardStorage = MailBox() + val expressPostcardStorage = MailBox() + + val expressPostcard = ExpressPostcard(15, "Serbia") + val postcard = Postcard("Germany") + + // TODO: add code to create topRatedPostman and juniorPostman. + // The topRatedPostman can send ONLY express postcards + // The juniorPostman can send both regular and express postcards + val topRatedPostman = Postman(listOf(expressPostcardStorage)) + val juniorPostman = Postman(listOf(postcardStorage)) + + topRatedPostman.send(expressPostcard) + juniorPostman.send(expressPostcard) + juniorPostman.send(postcard) +} diff --git a/src/main/kotlin/exercise6/taskProjections/task2/Task.kt b/src/main/kotlin/exercise6/taskProjections/task2/Task.kt new file mode 100644 index 0000000..85640f9 --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task2/Task.kt @@ -0,0 +1,38 @@ +package exercise6.taskProjections.task2 + +/** + * Task: Projections #2 + * + * Create the class "Programmer" with a type parameter T that is a ProgrammingLanguage. + * In this class, you need to add restrictions and allow creating only methods, which accept T. + * The methods, which return T, should be restricted. + * Then create one method learn, that accepts a language and prints "I learned ${language.name}!". + * If you did everything correct, you could not create a method create which accepts nothing and returns T +**/ + +class Programmer() { + fun learn(lang : T) { + println("I learned ${lang.name}!") + } +} + +interface ProgrammingLanguage { + val name: String +} +class JvmLanguage(override val name: String) : ProgrammingLanguage + +class BlockBasedLanguage(override val name: String) : ProgrammingLanguage + +fun main() { + val programmer = Programmer() + + val jvmLanguages = listOf(JvmLanguage("Java"), JvmLanguage("Kotlin")) + jvmLanguages.forEach{ programmer.learn(it) } // OK + + val blockBasedLanguages = listOf(BlockBasedLanguage("Scratch"), JvmLanguage("Snap")) + blockBasedLanguages.forEach{ programmer.learn(it) } // OK + + (jvmLanguages + blockBasedLanguages).forEach{ programmer.learn(it) } // OK + +// val newLanguage: ProgrammingLanguage = programmer.create() // ERROR +} diff --git a/src/main/kotlin/exercise6/taskProjections/task3/Task.kt b/src/main/kotlin/exercise6/taskProjections/task3/Task.kt new file mode 100644 index 0000000..fd8b2c6 --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task3/Task.kt @@ -0,0 +1,48 @@ +package exercise6.taskProjections.task3 + +/** + * Task: Projections #3 + * + * You have a hierarchy of classes here. + * You need to initialize parsersHashMap in the right way to make the code compilable. +**/ + +abstract class ProgrammingLanguage + +class JvmLanguage : ProgrammingLanguage() +class BlockBasedLanguage : ProgrammingLanguage() + +interface LanguageParser { + @Suppress("UNCHECKED_CAST") + fun parse(language: ProgrammingLanguage) { + val tmpLang = language as? T + ?: error("Invalid type ${language.javaClass.name} passed to this parser") + internalParse(tmpLang) + } + + fun internalParse(item: T) +} + +class JvmLanguageParser : LanguageParser { + override fun internalParse(item: JvmLanguage) { + println("Parsing JvmLanguage") + } +} + +class BlockBasedLanguageParser : LanguageParser { + override fun internalParse(item: BlockBasedLanguage) { + println("Parsing BlockBasedLanguage") + } +} + +fun main() { + + val parsersHashMap = HashMap, LanguageParser<*>>() + + parsersHashMap[JvmLanguage::class.java] = JvmLanguageParser() + parsersHashMap[BlockBasedLanguage::class.java] = BlockBasedLanguageParser() + + val scratch = BlockBasedLanguage() + val foundParser = parsersHashMap[scratch.javaClass] + foundParser?.parse(scratch) +} diff --git a/src/main/kotlin/exercise6/taskProjections/task4/Task.kt b/src/main/kotlin/exercise6/taskProjections/task4/Task.kt new file mode 100644 index 0000000..873128c --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task4/Task.kt @@ -0,0 +1,31 @@ +package exercise6.taskProjections.task4 + +/** + * Projections #4 + * + * Implement a simple function copy, + * that accepts two arrays with a generic type of Any and copy elements from the first array to the second one. +**/ + +fun copy(array1 : Array, array2: Array) { + for(i in array1.indices) { + array2[i] = array1[i] + } +} + +fun main() { + val ints = arrayOf(1, 2, 3) + val any = Array(3) { "" } + ints.forEach{ print("$it ") } + println() + any.forEach{ print("$it ")} + println() + println("_______") + println("_______") + + copy(ints, any) + + ints.forEach{ print("$it ") } + println() + any.forEach{ print("$it ")} +} diff --git a/src/main/kotlin/exercise6/taskProjections/task5/Task.kt b/src/main/kotlin/exercise6/taskProjections/task5/Task.kt new file mode 100644 index 0000000..f95c23f --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task5/Task.kt @@ -0,0 +1,44 @@ +package exercise6.taskProjections.task5 + +/** + * Task: Projections #5 + * + * [1] + * Create a new class "Printer", that can accept only T elements and print them + * - add a "print" function that prints item with type T; + * + * [2] + * Create a new abstract class "Builder" that generates instances of T based on parameter of P type. + * This class cannot produce P and consume T: + * - add an abstract "build" function that accepts P and returns T; + * Create a new class "IntegerBuilder", that implements Builder and can convert String to Int +**/ + +class Printer() { + fun print(item : T) { + println("$item") + } +} + +abstract class Builder { + abstract fun build(item : P) : T +} + +class IntegerBuilder() : Builder() { + override fun build(item : String) : Int { + return item.toInt() + } +} +fun main() { + val integerPrinter = Printer() + val stringPrinter = Printer() + + integerPrinter.print(2) + stringPrinter.print("Bla bla bla") + + println("________") + + val intBuilder = IntegerBuilder() + val x = intBuilder.build("1") + println("We build [ $x ]") +} diff --git a/src/main/kotlin/exercise6/taskProjections/task6/Task.kt b/src/main/kotlin/exercise6/taskProjections/task6/Task.kt new file mode 100644 index 0000000..518fe1b --- /dev/null +++ b/src/main/kotlin/exercise6/taskProjections/task6/Task.kt @@ -0,0 +1,31 @@ +package exercise6.taskProjections.task6 + +/** + * Task: Projections #6 + * + * Put correct types inside the "funny" function +**/ + +open class A +class B : A() +class C : A() { fun consume(other: A): C = this } + +fun funny( + source: Iterator, + target: MutableCollection, + base: R, + how: (R, T) -> S +) { + var result: R = base + for (value in source) { + result = how(result, value) + target.add(result) + } +} + +fun main() { + val wtf = mutableListOf() + val src = mapOf(3.14 to B(), 2 to B(), "Hello" to B()) + val c = C() + funny(src.values.iterator(), wtf, c) { r, t -> r.consume(t) } +} diff --git a/src/main/kotlin/exercise7/LeagePreview.kt b/src/main/kotlin/exercise7/LeagePreview.kt new file mode 100644 index 0000000..c70ccf3 --- /dev/null +++ b/src/main/kotlin/exercise7/LeagePreview.kt @@ -0,0 +1,35 @@ +package exercise7 + +import common.FileReader + +internal fun parseFixtures(fixturesText: List): List { + val fixtureList : MutableList = emptyList().toMutableList() + for(match in fixturesText.drop(1)) { + val line = match.split(",") + val score = line[3].split("-") + val homeTeam = Team(line[2]) + val awayTeam = Team(line[4]) + val homeScore = score[0].toInt() + val awayScore = score[1].toInt() + + val matchList = mutableListOf(Match(homeTeam, awayTeam, homeScore, awayScore)) + val fixId = line[0].toInt() + fixtureList.add(Fixture(fixId, matchList)) + } + return fixtureList +} + +fun main() { + val fixturesText = FileReader.readFileInResources("exercise7/fixtures.csv") + val fixtures: List = parseFixtures(fixturesText) + val teams = fixtures.flatMap { it.matches } + .map { it -> it.awayTeam } + .toList().distinct() + + + val league: LeagueApi = League(teams, fixtures) + league.displayLeagueTable() + + league.displayLeagueTableAtFixture(13) + +} \ No newline at end of file diff --git a/src/main/kotlin/exercise7/League.kt b/src/main/kotlin/exercise7/League.kt new file mode 100644 index 0000000..721fbb6 --- /dev/null +++ b/src/main/kotlin/exercise7/League.kt @@ -0,0 +1,289 @@ +package exercise7 + +internal interface LeagueApi { + /** + * Represents a list of teams participating in a league. + * + * @property teams The list of teams. + */ + val teams: List + /** + * Returns the list of [LeagueTableEntry] where every team result of the season is aggregated. + * The League table is sorted by points descending. If more than one team has the same number of points, + * sort them by goal difference. + */ + val leagueTable: List + + /** + * Returns the team that won the league. + * + * @property leagueWinner The team that won the league. + * The Team won the league if it has the most points in the league. + * If two or more teams have a same number of points, the team with the best goal difference among them wins the league. + */ + val leagueWinner: Team + + /** + * Returns the team with the most wins in the league. + */ + val teamWithMostWins: Team + + /** + * Returns the team with the most draws in the league. + */ + val teamWithMostDraws: Team + + /** + * Returns the team with the most loses in a league. + */ + val teamWithMostLoses: Team + + /** + * Returns a team in the league with the best goal difference. + */ + val teamWithBestGoalDifference: Team + + /** + * Calculates the teams with the best defense based on the number of goals they have conceded. + * + * @param numOfTeams The number of teams to include in the result. + * @return The list of teams with the best defense, sorted in ascending order based on the number of goals conceded. + */ + fun teamsWithBestDefence(numOfTeams: Int): List + + /** + * Calculates the teams with the best offense based on the number of goals they have scored. + * + * @param numOfTeams The number of teams to include in the result. + * @return The list of teams with the best offense, sorted in descending order based on the number of goals scored. + */ + fun teamsWithBestOffense(numOfTeams: Int): List + + /** + * Calculates the number of goals that a team has scored against a specific opponent team. + * + * @param scorerTeam The team that has scored the goals. + * @param against The opponent team. + * @return The number of goals that the scorer team has scored against the opponent team. + */ + fun numOfGoalsTeamScoredAgainst(scorerTeam: Team, against: Team): Int + + /** + * Calculates the number of goals that a conceded team has conceded against a specific opponent team. + * + * @param concededTeam The team that has conceded the goals. + * @param against The opponent team. + * @return The number of goals that the scorer team has conceded against the opponent team. + */ + fun numOfGoalsTeamConcededAgainst(concededTeam: Team, against: Team): Int + + /** + * Display the league table after fixture with [fixtureId] was played. + * Table should be displayed in the same format as in a method [displayLeagueTable]. + */ + fun displayLeagueTableAtFixture(fixtureId: Int) + + /** + * Display league table with all fixtures are played. + * League table should be printed in the following format: + * ``` + * P | Team name | Games Played | Wins | Draws | Loses | GS | GC | Total Points + * 1. Manchester City 38 27 5 6 83 32 86 + * 2. Manchester Utd 38 21 11 6 73 44 74 + * 3. Liverpool 38 20 9 9 68 42 69 + * 4. Chelsea 38 19 10 9 58 36 67 + * 5. Leicester City 38 20 6 12 68 50 66 + * 6. West Ham 38 19 8 11 62 47 65 + * 7. Tottenham 38 18 8 12 68 45 62 + * 8. Arsenal 38 18 7 13 55 39 61 + * 9. Leeds United 38 18 5 15 62 54 59 + * 10. Everton 38 17 8 13 47 48 59 + * 11. Aston Villa 38 16 7 15 55 46 55 + * 12. Newcastle Utd 38 12 9 17 46 62 45 + * 13. Wolves 38 12 9 17 36 52 45 + * 14. Crystal Palace 38 12 8 18 41 66 44 + * 15. Southampton 38 12 7 19 47 68 43 + * 16. Brighton 38 9 14 15 40 46 41 + * 17. Burnley 38 10 9 19 33 55 39 + * 18. Fulham 38 5 13 20 27 53 28 + * 19. West Brom 38 5 11 22 35 76 26 + * 20. Sheffield Utd 38 7 2 29 20 63 23 + * ``` + * where columns are ordered as following: + * `P` - is a position on the board + * `Team name` - name of the team + * `Games Played` - total games played by team + * `Wins` - total wins by team + * `Draws` - total draws by team + * `Loses` - total loses by team + * `GS` - total goals scored by team + * `GC` - total goals conceded by team + * `Total Points` - total points won by team + */ + fun displayLeagueTable() +} + +/** + * Task: Implement class [League] that implements [LeagueApi] interface. Class [League] has two properties: + * @property teams - teams in the League. + * @property fixtures - League fixtures with a set of games played that round. + * + * Task: In class init block, validate parameters of the class. + * Parameters are valid if all the fixtures contain only teams from the [teams] list, + * and [teams] are all mentioned in the [fixtures] list. + */ + +class League( + override val teams: List, + private val fixtures: List +) : LeagueApi { + override val leagueTable: List + get() { + val tableEntries = mutableListOf() + + for (team in teams) { + val gamesPlayed = fixtures.flatMap { it.matches } + .count { it.homeTeam == team || it.awayTeam == team } + val wins = fixtures.flatMap { it.matches } + .count { match -> + (match.homeTeam == team && match.homeTeamScore > match.awayTeamScore) || + (match.awayTeam == team && match.awayTeamScore > match.homeTeamScore) + } + val draws = fixtures.flatMap { it.matches } + .count { match -> + (match.homeTeam == team || match.awayTeam == team) && match.homeTeamScore == match.awayTeamScore + } + val loses = gamesPlayed - wins - draws + val goalsScored = fixtures.flatMap { it.matches } + .filter { it.homeTeam == team || it.awayTeam == team } + .sumBy { if (it.homeTeam == team) it.homeTeamScore else it.awayTeamScore } + val goalsConceded = fixtures.flatMap { it.matches } + .filter { it.homeTeam == team || it.awayTeam == team } + .sumBy { if (it.homeTeam == team) it.awayTeamScore else it.homeTeamScore } + + tableEntries.add(LeagueTableEntry(team, gamesPlayed, wins, loses, draws, goalsScored, goalsConceded)) + } + return tableEntries.sortedByDescending { it.totalPoints } + } + override val leagueWinner: Team + get() = leagueTable.get(0).team + override val teamWithMostWins: Team + get() = leagueTable.sortedByDescending { it.wins } + .get(0).team + override val teamWithMostDraws: Team + get() = leagueTable.sortedByDescending { it.draws } + .get(0).team + override val teamWithMostLoses: Team + get() = leagueTable.sortedByDescending { it.loses } + .get(0).team + override val teamWithBestGoalDifference: Team + get() = leagueTable.sortedByDescending { (it.totalScoredGoals - it.totalConcededGoals) } + .get(0).team + + + override fun teamsWithBestDefence(numOfTeams: Int): List { + return leagueTable.sortedBy { it.totalConcededGoals } + .take(numOfTeams).map { it.team } + } + + override fun teamsWithBestOffense(numOfTeams: Int): List { + return leagueTable.sortedByDescending { it.totalScoredGoals } + .take(numOfTeams).map { it.team } + } + + override fun numOfGoalsTeamScoredAgainst(scorerTeam: Team, against: Team): Int { + return fixtures.flatMap { it.matches } + .filter { (it.homeTeam == scorerTeam && it.awayTeam == against) || (it.awayTeam == scorerTeam && it.homeTeam == against) } + .sumBy { if (it.homeTeam == scorerTeam) it.homeTeamScore else it.awayTeamScore } + } + + override fun numOfGoalsTeamConcededAgainst(concededTeam: Team, against: Team): Int { + return fixtures.flatMap { it.matches } + .filter { (it.homeTeam == concededTeam && it.awayTeam == against) || (it.awayTeam == concededTeam && it.homeTeam == against) } + .sumBy { if (it.homeTeam == concededTeam) it.awayTeamScore else it.homeTeamScore } + } + + override fun displayLeagueTableAtFixture(fixtureId: Int) { + println("P | Team name | Games Played | Wins | Draws | Loses | GS | GC | Total Points") + + val table = mutableListOf() + + for (team in teams) { + val gamesPlayed = fixtures.filter { it.fixtureId <= fixtureId } + .flatMap { it.matches } + .count { it.homeTeam == team || it.awayTeam == team } + val wins = fixtures.filter { it.fixtureId <= fixtureId } + .flatMap { it.matches } + .count { match -> + (match.homeTeam == team && match.homeTeamScore > match.awayTeamScore) || + (match.awayTeam == team && match.awayTeamScore > match.homeTeamScore) + } + val draws = fixtures.filter { it.fixtureId <= fixtureId } + .flatMap { it.matches } + .count { match -> + (match.homeTeam == team || match.awayTeam == team) && match.homeTeamScore == match.awayTeamScore + } + val loses = gamesPlayed - wins - draws + val goalsScored = fixtures.filter { it.fixtureId <= fixtureId } + .flatMap { it.matches } + .filter { it.homeTeam == team || it.awayTeam == team } + .sumBy { if (it.homeTeam == team) it.homeTeamScore else it.awayTeamScore } + val goalsConceded = fixtures.filter { it.fixtureId <= fixtureId } + .flatMap { it.matches } + .filter { it.homeTeam == team || it.awayTeam == team } + .sumBy { if (it.homeTeam == team) it.awayTeamScore else it.homeTeamScore } + + table.add(LeagueTableEntry(team, gamesPlayed, wins, loses, draws, goalsScored, goalsConceded)) + } + + var i = 1 + for (leagueTableEntry in table.sortedWith(compareByDescending { it.totalPoints } + .thenByDescending { it.totalScoredGoals - it.totalConcededGoals })) { + val teamName = leagueTableEntry.team.name + val gamesPlayed = leagueTableEntry.totalGamesPlayed + val wins = leagueTableEntry.wins + val draws = leagueTableEntry.draws + val loses = leagueTableEntry.loses + val goalsScored = leagueTableEntry.totalScoredGoals + val goalsConceded = leagueTableEntry.totalConcededGoals + val totalPoints = leagueTableEntry.totalPoints + + println( + String.format( + "%-2d| %-15s| %-13d| %-5d| %-6d| %-6d| %-3d| %-3d| %-13d", + i, teamName, gamesPlayed, wins, draws, loses, goalsScored, goalsConceded, totalPoints + ) + ) + i++ + } + } + + + + override fun displayLeagueTable() { + println("P | Team name | Games Played | Wins | Draws | Loses | GS | GC | Total Points") + var i = 1 + for (leagueTableEntry in leagueTable.sortedWith(compareByDescending { it.totalPoints } + .thenByDescending { it.totalScoredGoals - it.totalConcededGoals })) { + val teamName = leagueTableEntry.team.name + val gamesPlayed = leagueTableEntry.totalGamesPlayed + val wins = leagueTableEntry.wins + val draws = leagueTableEntry.draws + val loses = leagueTableEntry.loses + val goalsScored = leagueTableEntry.totalScoredGoals + val goalsConceded = leagueTableEntry.totalConcededGoals + val totalPoints = leagueTableEntry.totalPoints + + println( + String.format( + "%-2d| %-15s| %-13d| %-5d| %-6d| %-6d| %-3d| %-3d| %-13d", + i, teamName, gamesPlayed, wins, draws, loses, goalsScored, goalsConceded, totalPoints + ) + ) + i++ + } + } + + +} + diff --git a/src/main/kotlin/exercise7/models.kt b/src/main/kotlin/exercise7/models.kt new file mode 100644 index 0000000..7a8176b --- /dev/null +++ b/src/main/kotlin/exercise7/models.kt @@ -0,0 +1,78 @@ +package exercise7 + +/** + * Represents a team participating in a league. + * + * @property name The name of the team. + */ +data class Team(val name: String) { + override fun toString(): String { + return "$name" + } +} + +/** + * Represents a match between two teams. + * + * @property homeTeam The home team. + * @property awayTeam The away team. + * @property homeTeamScore The score of the home team. + * @property awayTeamScore The score of the away team. + */ +data class Match( + val homeTeam: Team, + val awayTeam: Team, + val homeTeamScore: Int, + val awayTeamScore: Int +) { + override fun toString(): String { + return "$homeTeam, $awayTeam, $awayTeamScore, $homeTeamScore" + } +} + +/** + * Represents a fixture which contains a fixture ID and a list of matches. + * + * @property fixtureId The ID of the fixture. + * @property matches The list of matches in the fixture. + */ +data class Fixture( + val fixtureId: Int, + val matches: List +) { + override fun toString(): String { + return "Fixture ID: $fixtureId Matches: $matches" + } +} + +/** + * Represents a team's entry in a league table. + * + * @param team The team participating in the league. + * @param totalGamesPlayed The total number of games played by the team. + * @param wins The number of wins by the team. + * @param loses The number of loses by the team. + * @param draws The number of draws by the team. + * @param totalScoredGoals The total number of goals scored by the team. + * @param totalConcededGoals The total number of goals conceded by the team. + */ +data class LeagueTableEntry( + val team: Team, + val totalGamesPlayed: Int, + val wins: Int, + val loses: Int, + val draws: Int, + val totalScoredGoals: Int, + val totalConcededGoals: Int, +) { + /** + * The total number of points earned by a team. + * The Team earns 3 points for every win, 1 point for a draw, and zero points for a loss. + */ + val totalPoints: Int get() = (wins * 3) + (draws * 1) + + override fun toString(): String { + return "${team.name}, $totalGamesPlayed, $wins, $loses, $draws, $totalScoredGoals, $totalConcededGoals" + } + +} diff --git a/src/main/kotlin/exercise8/MovieDB.kt b/src/main/kotlin/exercise8/MovieDB.kt new file mode 100644 index 0000000..b200c36 --- /dev/null +++ b/src/main/kotlin/exercise8/MovieDB.kt @@ -0,0 +1,64 @@ +package exercise8 + +/** + * Task: Write a MovieDB class that implements the MovieDBApi interface. + * + * Define a constructor of MovieDB class which accepts the list of movies as parameter. + * + * Implement methods defined by MovieDBApi. + * + */ + +class MovieDB( + private val movies: List +): MovieDBApi { + override fun getAllMoviesByActor(actor: MovieActor): List { + return movies.filter { movie -> movie.actors.contains(actor) } + } + + override fun getMoviesWithBiggestProfit(numOfMovies: Int): List { + return movies.sortedBy { it.revenue - it.budget } + .take(numOfMovies) + } + + override fun getBestRatedMovieByActor(actor: MovieActor): Movie? { + return movies.filter { movie -> movie.actors.contains(actor) } + .maxBy { it.rating } + } + + override fun getAllMoviesByYear(year: Int): List { + return movies.filter { movie -> movie.releaseDate.year == year } + } + + override fun getAllMoviesByGenre(genre: String): List { + return movies.filter { movie -> movie.genres.contains(genre) } + } + + override fun getBestRatedMovies(numOfMovies: Int): List { + return movies.sortedBy { it.rating } + .take(numOfMovies) + } + + override fun getDirectorWithMostMoviesDirected(): MovieDirector { + return movies.groupingBy { it.director } + .eachCount() + .maxBy { it.value } + .key + } + + override fun getActorsWithMostCostarredMovies(): List> { + TODO("IMPL") + + +// return movies.groupingBy { Pair(it.actors, it.actors) } +// .eachCount() +// .maxBy { it.value } +// +// val appearances = movies.groupingBy { it.actors } + + + + } + + +} \ No newline at end of file diff --git a/src/main/kotlin/exercise8/MovieDBApi.kt b/src/main/kotlin/exercise8/MovieDBApi.kt new file mode 100644 index 0000000..72e325b --- /dev/null +++ b/src/main/kotlin/exercise8/MovieDBApi.kt @@ -0,0 +1,112 @@ +package exercise8 + +import java.time.LocalDate + +/** + * Represents a movie director. + * + * @property name The name of the movie director. + */ +data class MovieDirector(val name: String) + +/** + * Represents a movie actor. + * + * @property name The name of the actor. + */ +data class MovieActor(val name: String) + +/** + * Represents a Movie. + * + * @property title The title of the movie. + * @property budget The budget of the movie in dollars. + * @property revenue The revenue of the movie in dollars. + * @property releaseDate The release date of the movie. + * @property runtimeInMinutes The runtime of the movie in minutes. + * @property director The director of the movie. + * @property genres The genres of the movie. + * @property actors The actors in the movie. + * @property rating The rating of the movie. + */ +data class Movie( + val title: String, + val budget: Long, + val revenue: Long, + val releaseDate: LocalDate, + val runtimeInMinutes: Int, + val director: MovieDirector, + val genres: List, + val actors: List, + val rating: Double +) + +interface MovieDBApi { + /** + * + * Retrieves a list of all movies that feature the given actor. + * + * @param actor The actor to search for. + * @return A list of movies that feature the given actor. + */ + fun getAllMoviesByActor(actor: MovieActor): List + + /** + * Retrieves a list of movies with the best profits. + * + * Movie profits are calculated by deducting revenue from its budget. + * + * @param numOfMovies The number of movies to retrieve. + * @return A list of movies with the best earnings. + */ + fun getMoviesWithBiggestProfit(numOfMovies: Int): List + + /** + * Retrieves the best-rated movie featuring the given actor. + * + * @param actor The actor to search for. + * @return The best-rated movie featuring the given actor, or null if no movie is found. + */ + fun getBestRatedMovieByActor(actor: MovieActor): Movie? + + /** + * Retrieves a list of all movies released in the specified year. + * + * @param year The year of release. + * @return A list of movies released in the specified year. + */ + fun getAllMoviesByYear(year: Int): List + + /** + * Retrieves a list of all movies that belong to the given genre. + * + * @param genre The genre to search for. + * @return A list of movies that belong to the given genre. + */ + fun getAllMoviesByGenre(genre: String): List + + /** + * Retrieves a list of the best-rated movies. + * + * The best-rated movies are determined by their rating, with the highest-rated movies appearing first. + * + * @param numOfMovies The number of movies to retrieve. + * @return A list of the best-rated movies. + */ + fun getBestRatedMovies(numOfMovies: Int): List + + /** + * Retrieves the movie director who has directed the most movies. + * + * @return The movie director with the most movies directed. + */ + fun getDirectorWithMostMoviesDirected(): MovieDirector + + /** + * Retrieves a list of actor pairs who have the most movies they acted in together. + * + * @return A list of MovieActor objects representing the actors with the most costarred movies. + */ + fun getActorsWithMostCostarredMovies(): List> +} + diff --git a/src/main/kotlin/exercise8/MovieDBRunner.kt b/src/main/kotlin/exercise8/MovieDBRunner.kt new file mode 100644 index 0000000..4001ac7 --- /dev/null +++ b/src/main/kotlin/exercise8/MovieDBRunner.kt @@ -0,0 +1,44 @@ +package exercise8 + +import common.FileReader +import java.time.LocalDate +import java.time.LocalDateTime + + +private fun parseMovies(moviesLines: List): List { + val movies : MutableList = emptyList().toMutableList() + for(movie in moviesLines.drop(1)) { + val actors : MutableList = emptyList().toMutableList() + val line = movie.split(";") + val budget = line[0].trim().toLong() + val genres = line[1].split(",") + val title = line[2].trim() + val rating = line[3].trim().toDouble() + val releaseDate = LocalDate.parse(line[4]) + val revenue = line[5].trim().toLong() + val runtime = line[6].trim().toDouble().toInt() + val cast = line[7].split(",") + for(actor in cast) { + actors.add(MovieActor(actor.trim())) + } + val director = MovieDirector(line[8]) + + movies.add(Movie(title, budget, revenue, releaseDate, runtime, director, genres, actors, rating)) + } + return movies +} + +fun main() { + val moviesCSVFile = FileReader.readFileInResources("exercise8/movies.csv") + val movies = parseMovies(moviesCSVFile) + + val movieDBApi : MovieDBApi = MovieDB(movies) + //println(movieDBApi.getAllMoviesByActor(MovieActor("Johnny Depp"))) + //println(movieDBApi.getMoviesWithBiggestProfit(2)) + //println(movieDBApi.getBestRatedMovieByActor(MovieActor("Johnny Depp"))) + //println(movieDBApi.getAllMoviesByYear(2003)) + //println(movieDBApi.getDirectorWithMostMoviesDirected()) + + + +} \ No newline at end of file diff --git a/src/main/resources/exercise7/fixtures.csv b/src/main/resources/exercise7/fixtures.csv new file mode 100644 index 0000000..3e7cccb --- /dev/null +++ b/src/main/resources/exercise7/fixtures.csv @@ -0,0 +1,381 @@ +Round,Date,Team 1,FT,Team 2 +1,Sat Sep 12 2020,Fulham,0-3,Arsenal +1,Sat Sep 12 2020,Crystal Palace,1-0,Southampton +1,Sat Sep 12 2020,Liverpool,4-3,Leeds United +1,Sat Sep 12 2020,West Ham,0-2,Newcastle Utd +1,Sun Sep 13 2020,West Brom,0-3,Leicester City +1,Sun Sep 13 2020,Tottenham,0-1,Everton +1,Mon Sep 14 2020,Sheffield Utd,0-2,Wolves +1,Mon Sep 14 2020,Brighton,1-3,Chelsea +1,Tue Jan 12 2021(P),Burnley,0-1,Manchester Utd +1,Wed Jan 20 2021(P),Manchester City,2-0,Aston Villa +2,Sat Sep 19 2020,Everton,5-2,West Brom +2,Sat Sep 19 2020,Leeds United,4-3,Fulham +2,Sat Sep 19 2020,Manchester Utd,1-3,Crystal Palace +2,Sat Sep 19 2020,Arsenal,2-1,West Ham +2,Sun Sep 20 2020,Southampton,2-5,Tottenham +2,Sun Sep 20 2020,Newcastle Utd,0-3,Brighton +2,Sun Sep 20 2020,Chelsea,0-2,Liverpool +2,Sun Sep 20 2020,Leicester City,4-2,Burnley +2,Mon Sep 21 2020,Aston Villa,1-0,Sheffield Utd +2,Mon Sep 21 2020,Wolves,1-3,Manchester City +3,Sat Sep 26 2020,Brighton,2-3,Manchester Utd +3,Sat Sep 26 2020,Crystal Palace,1-2,Everton +3,Sat Sep 26 2020,West Brom,3-3,Chelsea +3,Sat Sep 26 2020,Burnley,0-1,Southampton +3,Sun Sep 27 2020,Sheffield Utd,0-1,Leeds United +3,Sun Sep 27 2020,Tottenham,1-1,Newcastle Utd +3,Sun Sep 27 2020,Manchester City,2-5,Leicester City +3,Sun Sep 27 2020,West Ham,4-0,Wolves +3,Mon Sep 28 2020,Fulham,0-3,Aston Villa +3,Mon Sep 28 2020,Liverpool,3-1,Arsenal +4,Sat Oct 03 2020,Chelsea,4-0,Crystal Palace +4,Sat Oct 03 2020,Everton,4-2,Brighton +4,Sat Oct 03 2020,Leeds United,1-1,Manchester City +4,Sat Oct 03 2020,Newcastle Utd,3-1,Burnley +4,Sun Oct 04 2020,Southampton,2-0,West Brom +4,Sun Oct 04 2020,Leicester City,0-3,West Ham +4,Sun Oct 04 2020,Arsenal,2-1,Sheffield Utd +4,Sun Oct 04 2020,Wolves,1-0,Fulham +4,Sun Oct 04 2020,Manchester Utd,1-6,Tottenham +4,Sun Oct 04 2020,Aston Villa,7-2,Liverpool +5,Sat Oct 17 2020,Everton,2-2,Liverpool +5,Sat Oct 17 2020,Chelsea,3-3,Southampton +5,Sat Oct 17 2020,Manchester City,1-0,Arsenal +5,Sat Oct 17 2020,Newcastle Utd,1-4,Manchester Utd +5,Sun Oct 18 2020,Sheffield Utd,1-1,Fulham +5,Sun Oct 18 2020,Crystal Palace,1-1,Brighton +5,Sun Oct 18 2020,Tottenham,3-3,West Ham +5,Sun Oct 18 2020,Leicester City,0-1,Aston Villa +5,Mon Oct 19 2020,West Brom,0-0,Burnley +5,Mon Oct 19 2020,Leeds United,0-1,Wolves +6,Fri Oct 23 2020,Aston Villa,0-3,Leeds United +6,Sat Oct 24 2020,West Ham,1-1,Manchester City +6,Sat Oct 24 2020,Fulham,1-2,Crystal Palace +6,Sat Oct 24 2020,Manchester Utd,0-0,Chelsea +6,Sat Oct 24 2020,Liverpool,2-1,Sheffield Utd +6,Sun Oct 25 2020,Southampton,2-0,Everton +6,Sun Oct 25 2020,Wolves,1-1,Newcastle Utd +6,Sun Oct 25 2020,Arsenal,0-1,Leicester City +6,Mon Oct 26 2020,Brighton,1-1,West Brom +6,Mon Oct 26 2020,Burnley,0-1,Tottenham +7,Fri Oct 30 2020,Wolves,2-0,Crystal Palace +7,Sat Oct 31 2020,Sheffield Utd,0-1,Manchester City +7,Sat Oct 31 2020,Burnley,0-3,Chelsea +7,Sat Oct 31 2020,Liverpool,2-1,West Ham +7,Sun Nov 01 2020,Aston Villa,3-4,Southampton +7,Sun Nov 01 2020,Newcastle Utd,2-1,Everton +7,Sun Nov 01 2020,Manchester Utd,0-1,Arsenal +7,Sun Nov 01 2020,Tottenham,2-1,Brighton +7,Mon Nov 02 2020,Fulham,2-0,West Brom +7,Mon Nov 02 2020,Leeds United,1-4,Leicester City +8,Fri Nov 06 2020,Brighton,0-0,Burnley +8,Fri Nov 06 2020,Southampton,2-0,Newcastle Utd +8,Sat Nov 07 2020,Everton,1-3,Manchester Utd +8,Sat Nov 07 2020,Crystal Palace,4-1,Leeds United +8,Sat Nov 07 2020,Chelsea,4-1,Sheffield Utd +8,Sat Nov 07 2020,West Ham,1-0,Fulham +8,Sun Nov 08 2020,West Brom,0-1,Tottenham +8,Sun Nov 08 2020,Leicester City,1-0,Wolves +8,Sun Nov 08 2020,Manchester City,1-1,Liverpool +8,Sun Nov 08 2020,Arsenal,0-3,Aston Villa +9,Sat Nov 21 2020,Newcastle Utd,0-2,Chelsea +9,Sat Nov 21 2020,Aston Villa,1-2,Brighton +9,Sat Nov 21 2020,Tottenham,2-0,Manchester City +9,Sat Nov 21 2020,Manchester Utd,1-0,West Brom +9,Sun Nov 22 2020,Fulham,2-3,Everton +9,Sun Nov 22 2020,Sheffield Utd,0-1,West Ham +9,Sun Nov 22 2020,Leeds United,0-0,Arsenal +9,Sun Nov 22 2020,Liverpool,3-0,Leicester City +9,Mon Nov 23 2020,Burnley,1-0,Crystal Palace +9,Mon Nov 23 2020,Wolves,1-1,Southampton +10,Fri Nov 27 2020,Crystal Palace,0-2,Newcastle Utd +10,Sat Nov 28 2020,Brighton,1-1,Liverpool +10,Sat Nov 28 2020,Manchester City,5-0,Burnley +10,Sat Nov 28 2020,Everton,0-1,Leeds United +10,Sat Nov 28 2020,West Brom,1-0,Sheffield Utd +10,Sun Nov 29 2020,Southampton,2-3,Manchester Utd +10,Sun Nov 29 2020,Chelsea,0-0,Tottenham +10,Sun Nov 29 2020,Arsenal,1-2,Wolves +10,Mon Nov 30 2020,Leicester City,1-2,Fulham +10,Mon Nov 30 2020,West Ham,2-1,Aston Villa +11,Sat Dec 05 2020,Burnley,1-1,Everton +11,Sat Dec 05 2020,Manchester City,2-0,Fulham +11,Sat Dec 05 2020,West Ham,1-3,Manchester Utd +11,Sat Dec 05 2020,Chelsea,3-1,Leeds United +11,Sun Dec 06 2020,West Brom,1-5,Crystal Palace +11,Sun Dec 06 2020,Sheffield Utd,1-2,Leicester City +11,Sun Dec 06 2020,Tottenham,2-0,Arsenal +11,Sun Dec 06 2020,Liverpool,4-0,Wolves +11,Mon Dec 07 2020,Brighton,1-2,Southampton +11,Sat Jan 23 2021(P),Aston Villa,2-0,Newcastle Utd +12,Fri Dec 11 2020,Leeds United,1-2,West Ham +12,Sat Dec 12 2020,Wolves,0-1,Aston Villa +12,Sat Dec 12 2020,Newcastle Utd,2-1,West Brom +12,Sat Dec 12 2020,Manchester Utd,0-0,Manchester City +12,Sat Dec 12 2020,Everton,1-0,Chelsea +12,Sun Dec 13 2020,Southampton,3-0,Sheffield Utd +12,Sun Dec 13 2020,Crystal Palace,1-1,Tottenham +12,Sun Dec 13 2020,Fulham,1-1,Liverpool +12,Sun Dec 13 2020,Leicester City,3-0,Brighton +12,Sun Dec 13 2020,Arsenal,0-1,Burnley +13,Tue Dec 15 2020,Wolves,2-1,Chelsea +13,Tue Dec 15 2020,Manchester City,1-1,West Brom +13,Wed Dec 16 2020,Arsenal,1-1,Southampton +13,Wed Dec 16 2020,Leicester City,0-2,Everton +13,Wed Dec 16 2020,Leeds United,5-2,Newcastle Utd +13,Wed Dec 16 2020,Liverpool,2-1,Tottenham +13,Wed Dec 16 2020,West Ham,1-1,Crystal Palace +13,Wed Dec 16 2020,Fulham,0-0,Brighton +13,Thu Dec 17 2020,Aston Villa,0-0,Burnley +13,Thu Dec 17 2020,Sheffield Utd,2-3,Manchester Utd +14,Sat Dec 19 2020,Crystal Palace,0-7,Liverpool +14,Sat Dec 19 2020,Southampton,0-1,Manchester City +14,Sat Dec 19 2020,Everton,2-1,Arsenal +14,Sat Dec 19 2020,Newcastle Utd,1-1,Fulham +14,Sun Dec 20 2020,Brighton,1-1,Sheffield Utd +14,Sun Dec 20 2020,Tottenham,0-2,Leicester City +14,Sun Dec 20 2020,Manchester Utd,6-2,Leeds United +14,Sun Dec 20 2020,West Brom,0-3,Aston Villa +14,Mon Dec 21 2020,Burnley,2-1,Wolves +14,Mon Dec 21 2020,Chelsea,3-0,West Ham +15,Sat Dec 26 2020,Leicester City,2-2,Manchester Utd +15,Sat Dec 26 2020,Aston Villa,3-0,Crystal Palace +15,Sat Dec 26 2020,Fulham,0-0,Southampton +15,Sat Dec 26 2020,Arsenal,3-1,Chelsea +15,Sat Dec 26 2020,Sheffield Utd,0-1,Everton +15,Sat Dec 26 2020,Manchester City,2-0,Newcastle Utd +15,Sun Dec 27 2020,Leeds United,1-0,Burnley +15,Sun Dec 27 2020,West Ham,2-2,Brighton +15,Sun Dec 27 2020,Liverpool,1-1,West Brom +15,Sun Dec 27 2020,Wolves,1-1,Tottenham +16,Mon Dec 28 2020,Crystal Palace,1-1,Leicester City +16,Mon Dec 28 2020,Chelsea,1-1,Aston Villa +16,Tue Dec 29 2020,West Brom,0-5,Leeds United +16,Tue Dec 29 2020,Southampton,0-0,West Ham +16,Tue Dec 29 2020,Burnley,1-0,Sheffield Utd +16,Tue Dec 29 2020,Brighton,0-1,Arsenal +16,Tue Dec 29 2020,Manchester Utd,1-0,Wolves +16,Wed Dec 30 2020,Newcastle Utd,0-0,Liverpool +16,Wed Jan 13 2021(P),Tottenham,1-1,Fulham +16,Wed Feb 17 2021(P),Everton,1-3,Manchester City +17,Fri Jan 01 2021,Everton,0-1,West Ham +17,Fri Jan 01 2021,Manchester Utd,2-1,Aston Villa +17,Sat Jan 02 2021,Tottenham,3-0,Leeds United +17,Sat Jan 02 2021,Crystal Palace,2-0,Sheffield Utd +17,Sat Jan 02 2021,Brighton,3-3,Wolves +17,Sat Jan 02 2021,West Brom,0-4,Arsenal +17,Sun Jan 03 2021,Newcastle Utd,1-2,Leicester City +17,Sun Jan 03 2021,Chelsea,1-3,Manchester City +17,Mon Jan 04 2021,Southampton,1-0,Liverpool +17,Wed Feb 17 2021(P),Burnley,1-1,Fulham +18,Tue Jan 12 2021,Sheffield Utd,1-0,Newcastle Utd +18,Tue Jan 12 2021,Wolves,1-2,Everton +18,Wed Jan 13 2021,Manchester City,1-0,Brighton +18,Thu Jan 14 2021,Arsenal,0-0,Crystal Palace +18,Tue Jan 19 2021,West Ham,2-1,West Brom +18,Tue Jan 19 2021,Leicester City,2-0,Chelsea +18,Wed Jan 20 2021,Fulham,1-2,Manchester Utd +18,Thu Jan 21 2021,Liverpool,0-1,Burnley +18,Tue Feb 23 2021(P),Leeds United,3-0,Southampton +18,Sun Mar 21 2021(P),Aston Villa,0-2,Tottenham +19,Sat Jan 16 2021,Wolves,2-3,West Brom +19,Sat Jan 16 2021,West Ham,1-0,Burnley +19,Sat Jan 16 2021,Leeds United,0-1,Brighton +19,Sat Jan 16 2021,Fulham,0-1,Chelsea +19,Sat Jan 16 2021,Leicester City,2-0,Southampton +19,Sun Jan 17 2021,Sheffield Utd,1-3,Tottenham +19,Sun Jan 17 2021,Liverpool,0-0,Manchester Utd +19,Sun Jan 17 2021,Manchester City,4-0,Crystal Palace +19,Mon Jan 18 2021,Arsenal,3-0,Newcastle Utd +19,Thu May 13 2021(P),Aston Villa,0-0,Everton +20,Tue Jan 26 2021,Newcastle Utd,1-2,Leeds United +20,Tue Jan 26 2021,Crystal Palace,2-3,West Ham +20,Tue Jan 26 2021,West Brom,0-5,Manchester City +20,Tue Jan 26 2021,Southampton,1-3,Arsenal +20,Wed Jan 27 2021,Chelsea,0-0,Wolves +20,Wed Jan 27 2021,Burnley,3-2,Aston Villa +20,Wed Jan 27 2021,Brighton,0-0,Fulham +20,Wed Jan 27 2021,Everton,1-1,Leicester City +20,Wed Jan 27 2021,Manchester Utd,1-2,Sheffield Utd +20,Thu Jan 28 2021,Tottenham,1-3,Liverpool +21,Sat Jan 30 2021,Everton,0-2,Newcastle Utd +21,Sat Jan 30 2021,Crystal Palace,1-0,Wolves +21,Sat Jan 30 2021,Manchester City,1-0,Sheffield Utd +21,Sat Jan 30 2021,West Brom,2-2,Fulham +21,Sat Jan 30 2021,Arsenal,0-0,Manchester Utd +21,Sat Jan 30 2021,Southampton,0-1,Aston Villa +21,Sun Jan 31 2021,Chelsea,2-0,Burnley +21,Sun Jan 31 2021,Leicester City,1-3,Leeds United +21,Sun Jan 31 2021,West Ham,1-3,Liverpool +21,Sun Jan 31 2021,Brighton,1-0,Tottenham +22,Tue Feb 02 2021,Sheffield Utd,2-1,West Brom +22,Tue Feb 02 2021,Wolves,2-1,Arsenal +22,Tue Feb 02 2021,Manchester Utd,9-0,Southampton +22,Tue Feb 02 2021,Newcastle Utd,1-2,Crystal Palace +22,Wed Feb 03 2021,Burnley,0-2,Manchester City +22,Wed Feb 03 2021,Fulham,0-2,Leicester City +22,Wed Feb 03 2021,Leeds United,1-2,Everton +22,Wed Feb 03 2021,Liverpool,0-1,Brighton +22,Wed Feb 03 2021,Aston Villa,1-3,West Ham +22,Thu Feb 04 2021,Tottenham,0-1,Chelsea +23,Sat Feb 06 2021,Aston Villa,1-0,Arsenal +23,Sat Feb 06 2021,Burnley,1-1,Brighton +23,Sat Feb 06 2021,Newcastle Utd,3-2,Southampton +23,Sat Feb 06 2021,Fulham,0-0,West Ham +23,Sat Feb 06 2021,Manchester Utd,3-3,Everton +23,Sun Feb 07 2021,Tottenham,2-0,West Brom +23,Sun Feb 07 2021,Wolves,0-0,Leicester City +23,Sun Feb 07 2021,Liverpool,1-4,Manchester City +23,Sun Feb 07 2021,Sheffield Utd,1-2,Chelsea +23,Mon Feb 08 2021,Leeds United,2-0,Crystal Palace +24,Sat Feb 13 2021,Leicester City,3-1,Liverpool +24,Sat Feb 13 2021,Crystal Palace,0-3,Burnley +24,Sat Feb 13 2021,Manchester City,3-0,Tottenham +24,Sat Feb 13 2021,Brighton,0-0,Aston Villa +24,Sun Feb 14 2021,Southampton,1-2,Wolves +24,Sun Feb 14 2021,West Brom,1-1,Manchester Utd +24,Sun Feb 14 2021,Arsenal,4-2,Leeds United +24,Sun Feb 14 2021,Everton,0-2,Fulham +24,Mon Feb 15 2021,West Ham,3-0,Sheffield Utd +24,Mon Feb 15 2021,Chelsea,2-0,Newcastle Utd +25,Fri Feb 19 2021,Wolves,1-0,Leeds United +25,Sat Feb 20 2021,Southampton,1-1,Chelsea +25,Sat Feb 20 2021,Burnley,0-0,West Brom +25,Sat Feb 20 2021,Liverpool,0-2,Everton +25,Sat Feb 20 2021,Fulham,1-0,Sheffield Utd +25,Sun Feb 21 2021,West Ham,2-1,Tottenham +25,Sun Feb 21 2021,Aston Villa,1-2,Leicester City +25,Sun Feb 21 2021,Arsenal,0-1,Manchester City +25,Sun Feb 21 2021,Manchester Utd,3-1,Newcastle Utd +25,Mon Feb 22 2021,Brighton,1-2,Crystal Palace +26,Sat Feb 27 2021,Manchester City,2-1,West Ham +26,Sat Feb 27 2021,West Brom,1-0,Brighton +26,Sat Feb 27 2021,Leeds United,0-1,Aston Villa +26,Sat Feb 27 2021,Newcastle Utd,1-1,Wolves +26,Sun Feb 28 2021,Crystal Palace,0-0,Fulham +26,Sun Feb 28 2021,Leicester City,1-3,Arsenal +26,Sun Feb 28 2021,Tottenham,4-0,Burnley +26,Sun Feb 28 2021,Chelsea,0-0,Manchester Utd +26,Sun Feb 28 2021,Sheffield Utd,0-2,Liverpool +26,Mon Mar 01 2021,Everton,1-0,Southampton +27,Sat Mar 06 2021,Burnley,1-1,Arsenal +27,Sat Mar 06 2021,Sheffield Utd,0-2,Southampton +27,Sat Mar 06 2021,Aston Villa,0-0,Wolves +27,Sat Mar 06 2021,Brighton,1-2,Leicester City +27,Sun Mar 07 2021,West Brom,0-0,Newcastle Utd +27,Sun Mar 07 2021,Liverpool,0-1,Fulham +27,Sun Mar 07 2021,Manchester City,0-2,Manchester Utd +27,Sun Mar 07 2021,Tottenham,4-1,Crystal Palace +27,Mon Mar 08 2021,Chelsea,2-0,Everton +27,Mon Mar 08 2021,West Ham,2-0,Leeds United +28,Fri Mar 12 2021,Newcastle Utd,1-1,Aston Villa +28,Sat Mar 13 2021,Leeds United,0-0,Chelsea +28,Sat Mar 13 2021,Crystal Palace,1-0,West Brom +28,Sat Mar 13 2021,Everton,1-2,Burnley +28,Sat Mar 13 2021,Fulham,0-3,Manchester City +28,Sun Mar 14 2021,Southampton,1-2,Brighton +28,Sun Mar 14 2021,Leicester City,5-0,Sheffield Utd +28,Sun Mar 14 2021,Arsenal,2-1,Tottenham +28,Sun Mar 14 2021,Manchester Utd,1-0,West Ham +28,Mon Mar 15 2021,Wolves,0-1,Liverpool +29,Tue Mar 02 2021,Manchester City,4-1,Wolves +29,Wed Mar 03 2021,Sheffield Utd,1-0,Aston Villa +29,Wed Mar 03 2021,Burnley,1-1,Leicester City +29,Wed Mar 03 2021,Crystal Palace,0-0,Manchester Utd +29,Thu Mar 04 2021,West Brom,0-1,Everton +29,Thu Mar 04 2021,Liverpool,0-1,Chelsea +29,Fri Mar 19 2021,Fulham,1-2,Leeds United +29,Sat Mar 20 2021,Brighton,3-0,Newcastle Utd +29,Sun Mar 21 2021,West Ham,3-3,Arsenal +29,Wed Apr 21 2021(P),Tottenham,2-1,Southampton +30,Sat Apr 03 2021,Chelsea,2-5,West Brom +30,Sat Apr 03 2021,Leeds United,2-1,Sheffield Utd +30,Sat Apr 03 2021,Leicester City,0-2,Manchester City +30,Sat Apr 03 2021,Arsenal,0-3,Liverpool +30,Sun Apr 04 2021,Southampton,3-2,Burnley +30,Sun Apr 04 2021,Newcastle Utd,2-2,Tottenham +30,Sun Apr 04 2021,Aston Villa,3-1,Fulham +30,Sun Apr 04 2021,Manchester Utd,2-1,Brighton +30,Mon Apr 05 2021,Everton,1-1,Crystal Palace +30,Mon Apr 05 2021,Wolves,2-3,West Ham +31,Fri Apr 09 2021,Fulham,0-1,Wolves +31,Sat Apr 10 2021,Manchester City,1-2,Leeds United +31,Sat Apr 10 2021,Liverpool,2-1,Aston Villa +31,Sat Apr 10 2021,Crystal Palace,1-4,Chelsea +31,Sun Apr 11 2021,Burnley,1-2,Newcastle Utd +31,Sun Apr 11 2021,West Ham,3-2,Leicester City +31,Sun Apr 11 2021,Tottenham,1-3,Manchester Utd +31,Sun Apr 11 2021,Sheffield Utd,0-3,Arsenal +31,Mon Apr 12 2021,West Brom,3-0,Southampton +31,Mon Apr 12 2021,Brighton,0-0,Everton +32,Fri Apr 16 2021,Everton,2-2,Tottenham +32,Sat Apr 17 2021,Newcastle Utd,3-2,West Ham +32,Sat Apr 17 2021,Wolves,1-0,Sheffield Utd +32,Sun Apr 18 2021,Arsenal,1-1,Fulham +32,Sun Apr 18 2021,Manchester Utd,3-1,Burnley +32,Mon Apr 19 2021,Leeds United,1-1,Liverpool +32,Tue Apr 20 2021,Chelsea,0-0,Brighton +32,Wed Apr 21 2021,Aston Villa,1-2,Manchester City +32,Thu Apr 22 2021,Leicester City,3-0,West Brom +32,Tue May 11 2021(P),Southampton,3-1,Crystal Palace +33,Thu Mar 04 2021,Fulham,0-1,Tottenham +33,Wed Mar 10 2021,Manchester City,5-2,Southampton +33,Fri Apr 23 2021,Arsenal,0-1,Everton +33,Sat Apr 24 2021,Liverpool,1-1,Newcastle Utd +33,Sat Apr 24 2021,West Ham,0-1,Chelsea +33,Sat Apr 24 2021,Sheffield Utd,1-0,Brighton +33,Sun Apr 25 2021,Wolves,0-4,Burnley +33,Sun Apr 25 2021,Leeds United,0-0,Manchester Utd +33,Sun Apr 25 2021,Aston Villa,2-2,West Brom +33,Mon Apr 26 2021,Leicester City,2-1,Crystal Palace +34,Fri Apr 30 2021,Southampton,1-1,Leicester City +34,Sat May 01 2021,Crystal Palace,0-2,Manchester City +34,Sat May 01 2021,Brighton,2-0,Leeds United +34,Sat May 01 2021,Chelsea,2-0,Fulham +34,Sat May 01 2021,Everton,1-2,Aston Villa +34,Sun May 02 2021,Newcastle Utd,0-2,Arsenal +34,Sun May 02 2021,Tottenham,4-0,Sheffield Utd +34,Mon May 03 2021,West Brom,1-1,Wolves +34,Mon May 03 2021,Burnley,1-2,West Ham +34,Thu May 13 2021(P),Manchester Utd,2-4,Liverpool +35,Fri May 07 2021,Leicester City,2-4,Newcastle Utd +35,Sat May 08 2021,Leeds United,3-1,Tottenham +35,Sat May 08 2021,Sheffield Utd,0-2,Crystal Palace +35,Sat May 08 2021,Manchester City,1-2,Chelsea +35,Sat May 08 2021,Liverpool,2-0,Southampton +35,Sun May 09 2021,Wolves,2-1,Brighton +35,Sun May 09 2021,Aston Villa,1-3,Manchester Utd +35,Sun May 09 2021,West Ham,0-1,Everton +35,Sun May 09 2021,Arsenal,3-1,West Brom +35,Mon May 10 2021,Fulham,0-2,Burnley +36,Tue May 11 2021,Manchester Utd,1-2,Leicester City +36,Wed May 12 2021,Chelsea,0-1,Arsenal +36,Fri May 14 2021,Newcastle Utd,3-4,Manchester City +36,Sat May 15 2021,Burnley,0-4,Leeds United +36,Sat May 15 2021,Southampton,3-1,Fulham +36,Sat May 15 2021,Brighton,1-1,West Ham +36,Sun May 16 2021,Crystal Palace,3-2,Aston Villa +36,Sun May 16 2021,Tottenham,2-0,Wolves +36,Sun May 16 2021,West Brom,1-2,Liverpool +36,Sun May 16 2021,Everton,0-1,Sheffield Utd +37,Tue May 18 2021,Manchester Utd,1-1,Fulham +37,Tue May 18 2021,Southampton,0-2,Leeds United +37,Tue May 18 2021,Brighton,3-2,Manchester City +37,Tue May 18 2021,Chelsea,2-1,Leicester City +37,Wed May 19 2021,Newcastle Utd,1-0,Sheffield Utd +37,Wed May 19 2021,Tottenham,1-2,Aston Villa +37,Wed May 19 2021,Everton,1-0,Wolves +37,Wed May 19 2021,Crystal Palace,1-3,Arsenal +37,Wed May 19 2021,Burnley,0-3,Liverpool +37,Wed May 19 2021,West Brom,1-3,West Ham +38,Sun May 23 2021,Aston Villa,2-1,Chelsea +38,Sun May 23 2021,Leicester City,2-4,Tottenham +38,Sun May 23 2021,Manchester City,5-0,Everton +38,Sun May 23 2021,Sheffield Utd,1-0,Burnley +38,Sun May 23 2021,Wolves,1-2,Manchester Utd +38,Sun May 23 2021,West Ham,3-0,Southampton +38,Sun May 23 2021,Leeds United,3-1,West Brom +38,Sun May 23 2021,Arsenal,2-0,Brighton +38,Sun May 23 2021,Liverpool,2-0,Crystal Palace +38,Sun May 23 2021,Fulham,0-2,Newcastle Utd \ No newline at end of file diff --git a/src/main/resources/exercise8/movies.csv b/src/main/resources/exercise8/movies.csv new file mode 100644 index 0000000..b42fa99 --- /dev/null +++ b/src/main/resources/exercise8/movies.csv @@ -0,0 +1,500 @@ +budget;genres;title;rating;release_date;revenue;runtime;cast;director +380000000;Adventure,Action,Fantasy;Pirates of the Caribbean: On Stranger Tides;135.413856;2011-05-14;1045713802;136.0;Johnny Depp,Penélope Cruz,Ian McShane,Kevin McNally,Geoffrey Rush,;Rob Marshall +300000000;Adventure,Fantasy,Action;Pirates of the Caribbean: At World's End;139.082615;2007-05-19;961000000;169.0;Johnny Depp,Orlando Bloom,Keira Knightley,Stellan Skarsgard,Chow Yun-fat,;Gore Verbinski +280000000;Action,Adventure,Science_Fiction;Avengers: Age of Ultron;134.27922900000002;2015-04-22;1405403694;141.0;Robert Downey Jr.,Chris Hemsworth,Mark Ruffalo,Chris Evans,Scarlett Johansson;Joss Whedon +270000000;Adventure,Fantasy,Action,Science_Fiction;Superman Returns;57.925623;2006-06-28;391081192;154.0;Brandon Routh,Kevin Spacey,Kate Bosworth,James Marsden,Parker Posey,;Bryan Singer +260000000;Animation,Family;Tangled;48.681969;2010-11-24;591794936;100.0;Zachary Levi,Mandy Moore,Donna Murphy,Ron Perlman,M.C. Gainey,;Byron Howard +255000000;Action,Adventure,Western;The Lone Ranger;49.046956;2013-07-03;89289910;149.0;Johnny Depp,Armie Hammer,William Fichtner,Helena Bonham,Carter James,Badge Dale,;Gore Verbinski +250000000;Action,Crime,Drama,Thriller;The Dark Knight Rises;112.31295;2012-07-16;1084939099;165.0;Christian Bale,Michael Caine,Gary Oldman,Anne Hathaway,Tom Hardy,;Christopher Nolan +250000000;Adventure,Fantasy,Family;Harry Potter and the Half-Blood Prince;98.885637;2009-07-07;933959197;153.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Tom Felton,Michael Gambon,;David Yates +250000000;Action,Adventure,Fantasy;Batman v Superman: Dawn of Justice;155.790452;2016-03-23;873260194;151.0;Ben Affleck,Henry Cavill,Gal Gadot,Amy Adams,Jesse Eisenberg,;Zack Snyder +250000000;Action,Adventure,Fantasy;The Hobbit: The Battle of the Five Armies;120.96574299999999;2014-12-10;956019788;144.0;Martin Freeman,Ian McKellen,Richard Armitage,Ken Stott,Graham McTavish,;Peter Jackson +250000000;Adventure,Fantasy;The Hobbit: The Desolation of Smaug;94.370564;2013-12-11;958400000;161.0;Martin Freeman,Ian McKellen,Richard Armitage,Ken Stott,Graham McTavish,;Peter Jackson +250000000;Adventure,Action,Science_Fiction;Captain America: Civil War;198.37239499999998;2016-04-27;1153304495;147.0;Chris Evans,Robert Downey Jr.,Scarlett Johansson,Sebastian Stan,Anthony Mackie;Anthony Russo +250000000;Action,Adventure,Fantasy,Science_Fiction;X-Men: Days of Future Past;118.07869099999999;2014-05-15;747862775;131.0;Hugh Jackman,James McAvoy,Michael Fassbender,Jennifer Lawrence,Halle Berry,;Bryan Singer +250000000;Adventure,Fantasy,Action;The Hobbit: An Unexpected Journey;108.849621;2012-11-26;1021103568;169.0;Ian McKellen,Martin Freeman,Richard Armitage,Andy Serkis,Cate Blanchett,;Peter Jackson +245000000;Action,Adventure,Crime;Spectre;107.37678799999999;2015-10-26;880674609;148.0;Daniel Craig,Christoph Waltz,Léa Seydoux,Ralph Fiennes,Monica Bellucci,;Sam Mendes +237000000;Action,Adventure,Fantasy,Science_Fiction;Avatar;150.437577;2009-12-10;2787965087;162.0;Sam Worthington,Zoe Saldana,Sigourney Weaver,Stephen Lang,Michelle Rodriguez,;James Cameron +225000000;Action,Adventure,Fantasy,Science_Fiction;Man of Steel;99.398009;2013-06-12;662845518;143.0;Henry Cavill,Amy Adams,Michael Shannon,Kevin Costner,Diane Lane,;Zack Snyder +225000000;Adventure,Family,Fantasy;The Chronicles of Narnia: Prince Caspian;53.978602;2008-05-15;419651413;150.0;Ben Barnes,William Moseley,Anna Popplewell,Skandar Keynes,Georgie Henley,;Andrew Adamson +225000000;Action,Comedy,Science_Fiction;Men in Black 3;52.035179;2012-05-23;624026776;106.0;Will Smith,Tommy Lee Jones,Josh Brolin,Michael Stuhlbarg,Emma Thompson;Barry Sonnenfeld +220000000;Science_Fiction,Action,Adventure;The Avengers;144.448633;2012-04-25;1519557910;143.0;Robert Downey Jr.,Chris Evans,Mark Ruffalo,Chris Hemsworth,Scarlett Johansson;Joss Whedon +215000000;Action,Adventure,Fantasy;The Amazing Spider-Man;89.866276;2012-06-27;752215857;136.0;Andrew Garfield,Emma Stone,Rhys Ifans,Denis Leary,Campbell Scott,;Marc Webb +210000000;Adventure,Action,Science_Fiction,Thriller;X-Men: The Last Stand;3.857526;2006-05-24;459359555;104.0;Hugh Jackman,Halle Berry,Ian McKellen,Patrick Stewart,Famke Janssen,;Brett Ratner +210000000;Science_Fiction,Action,Adventure;Transformers: Age of Extinction;116.840296;2014-06-25;1091405097;165.0;Mark Wahlberg,Stanley Tucci,Kelsey Grammer,Nicola Peltz,Jack Reynor,;Michael Bay +207000000;Adventure,Drama,Action;King Kong;61.226009999999995;2005-12-14;550000000;187.0;Naomi Watts,Jack Black,Adrien Brody,Thomas Kretschmann,Colin Hanks,;Peter Jackson +200000000;Adventure,Action,Thriller,Crime;Quantum of Solace;107.92881100000001;2008-10-30;586090727;106.0;Daniel Craig,Olga Kurylenko,Mathieu Amalric,Judi Dench,Giancarlo Giannini,;Marc Forster +200000000;Adventure,Fantasy,Action;Pirates of the Caribbean: Dead Man's Chest;145.84737900000005;2006-06-20;1065659812;151.0;Johnny Depp,Orlando Bloom,Keira Knightley,Stellan Skarsgard,Bill Nighy,;Gore Verbinski +200000000;Drama,Romance,Thriller;Titanic;100.025899;1997-11-18;1845034188;194.0;Kate Winslet,Leonardo DiCaprio,Frances Fisher,Billy Zane,Kathy Bates,;James Cameron +200000000;Action,Adventure,Thriller;Skyfall;93.004993;2012-10-25;1108561013;143.0;Daniel Craig,Judi Dench,Javier Bardem,Ralph Fiennes,Naomie Harris,;Sam Mendes +200000000;Action,Adventure,Fantasy;Spider-Man 2;35.149586;2004-06-25;783766341;127.0;Tobey Maguire,Kirsten Dunst,James Franco,Alfred Molina,Rosemary Harris,;Sam Raimi +200000000;Action,Adventure,Science_Fiction;Iron Man 3;77.68208;2013-04-18;1215439994;130.0;Robert Downey Jr.,Gwyneth Paltrow,Don Cheadle,Guy Pearce,Rebecca Hall;Shane Black +200000000;Animation,Family;Monsters University;89.186492;2013-06-20;743559607;104.0;Billy Crystal,John Goodman,Steve Buscemi,Helen Mirren,Noah Johnston,;Dan Scanlon +200000000;Fantasy,Adventure,Family;Oz: The Great and Powerful;46.985445;2013-03-07;491868548;130.0;James Franco,Mila Kunis,Rachel Weisz,Michelle Williams,Zach Braff,;Sam Raimi +200000000;Action,Adventure,Fantasy;The Amazing Spider-Man 2;89.270217;2014-04-16;705717432;142.0;Andrew Garfield,Emma Stone,Jamie Foxx,Dane DeHaan,Campbell Scott,;Marc Webb +200000000;Animation,Family,Adventure,Comedy;Cars 2;49.98659;2011-06-11;559852396;106.0;Owen Wilson,Larry the,Cable Guy,Michael Caine,Emily Mortimer,John Turturro,;John Lasseter +200000000;Adventure,Action,Thriller,Science_Fiction;Green Lantern;51.872839;2011-06-16;219851172;114.0;Ryan Reynolds,Blake Lively,Peter Sarsgaard,Tim Robbins,Mark Strong,;Martin Campbell +200000000;Animation,Family,Comedy;Toy Story 3;59.99541800000001;2010-06-16;1066969703;103.0;Tom Hanks,Tim Allen,Ned Beatty,Joan Cusack,Michael Keaton,;Lee Unkrich +200000000;Action,Adventure,Science_Fiction;2012;45.274225;2009-10-10;769653595;158.0;John Cusack,Amanda Peet,Chiwetel Ejiofor,Thandie Newton,Oliver Platt,;Roland Emmerich +200000000;Animation,Drama;A Christmas Carol;39.744242;2009-11-04;325233863;96.0;Gary Oldman,Jim Carrey,Steve Valentine,Daryl Sabara,Sage Ryan,;Robert Zemeckis +200000000;Adventure,Action,Science_Fiction;Iron Man 2;77.30019399999998;2010-04-28;623933331;124.0;Robert Downey Jr.,Gwyneth Paltrow,Don Cheadle,Scarlett Johansson,Mickey Rourke;Jon Favreau +200000000;Action,Thriller,Science_Fiction;Terminator 3: Rise of the Machines;69.405188;2003-07-02;435000000;109.0;Arnold Schwarzenegger,Nick Stahl,Claire Danes,Kristanna Loken,David Andrews,;Jonathan Mostow +195000000;Action,Family,Fantasy;Jack the Giant Slayer;43.349855;2013-02-27;197687603;114.0;Nicholas Hoult,Eleanor Tomlinson,Ewan McGregor,Stanley Tucci,Ian McShane,;Bryan Singer +195000000;Action,Science_Fiction,Adventure;Transformers: Dark of the Moon;28.529607000000002;2011-06-28;1123746996;154.0;Shia LaBeouf,John Malkovich,Ken Jeong,Frances McDormand,Josh Duhamel,;Michael Bay +190000000;Action;Furious 7;102.32221700000001;2015-04-01;1506249360;137.0;Vin Diesel,Paul Walker,Dwayne Johnson,Michelle Rodriguez,Tyrese Gibson,;James Wan +190000000;Action,Adventure,Science_Fiction;Star Trek Into Darkness;78.29101800000002;2013-05-05;467365246;132.0;Chris Pine,Zachary Quinto,Zoe Saldana,Karl Urban,Simon Pegg,;J.J. Abrams +190000000;Adventure,Family,Mystery,Science_Fiction;Tomorrowland;130.311355;2015-05-19;209154322;130.0;Britt Robertson,George Clooney,Raffey Cassidy,Thomas Robinson,Hugh Laurie,;Brad Bird +185000000;Adventure,Action;Indiana Jones and the Kingdom of the Crystal Skull;75.674458;2008-05-21;786636033;122.0;Harrison Ford,Cate Blanchett,Shia LaBeouf,Ray Winstone,Karen Allen,;Steven Spielberg +185000000;Animation,Adventure,Comedy,Family,Action;Brave;125.114374;2012-06-21;538983207;93.0;Kelly Macdonald,Julie Walters,Billy Connolly,Emma Thompson,Kevin McKidd,;Brenda Chapman +185000000;Action,Adventure,Science_Fiction;Star Trek Beyond;65.352913;2016-07-07;343471816;122.0;Chris Pine,Zachary Quinto,Karl Urban,Simon Pegg,Zoe Saldana,;Justin Lin +185000000;Drama,Action,Crime,Thriller;The Dark Knight;187.322927;2008-07-16;1004558444;152.0;Christian Bale,Heath Ledger,Aaron Eckhart,Michael Caine,Maggie Gyllenhaal,;Christopher Nolan +180000000;Action,Science_Fiction,Adventure;Pacific Rim;56.523205000000004;2013-07-11;407602906;131.0;Idris Elba,Charlie Hunnam,Charlie Day,Ron Perlman,Burn Gorman,;Guillermo del Toro +180000000;Animation,Family;WALL·E;66.390712;2008-06-22;521311860;98.0;Ben Burtt,Elissa Knight,Jeff Garlin,Fred Willard,John Ratzenberger,;Andrew Stanton +180000000;Adventure,Family,Fantasy;The Chronicles of Narnia: The Lion, the Witch and the Wardrobe;67.391328;2005-12-07;748806957;143.0;William Moseley,Anna Popplewell,Skandar Keynes,Georgie Henley,Liam Neeson,;Andrew Adamson +180000000;Fantasy,Adventure,Action,Family,Romance;Maleficent;110.62064699999999;2014-05-28;758539785;97.0;Angelina Jolie,Elle Fanning,Sharlto Copley,Sam Riley,Juno Temple,;Robert Stromberg +178000000;Science_Fiction;X-Men: Apocalypse;139.272042;2016-05-18;543934787;144.0;James McAvoy,Michael Fassbender,Jennifer Lawrence,Nicholas Hoult,Oscar Isaac,;Bryan Singer +178000000;Action,Science_Fiction;Edge of Tomorrow;79.456485;2014-05-27;370541256;113.0;Tom Cruise,Emily Blunt,Brendan Gleeson,Bill Paxton,Jonas Armstrong,;Doug Liman +176000003;Science_Fiction,Fantasy,Action,Adventure;Jupiter Ascending;85.36908000000003;2015-02-04;183987723;124.0;Mila Kunis,Channing Tatum,Sean Bean,Eddie Redmayne,Douglas Booth,;Lilly Wachowski +175000000;Adventure,Animation,Family;The Good Dinosaur;51.692953;2015-11-14;331926147;93.0;Raymond Ochoa,Jack Bright,Jeffrey Wright,Frances McDormand,Maleah Nipay-Padilla,;Peter Sohn +175000000;Animation,Comedy,Family,Adventure;Up;92.201962;2009-05-13;735099082;96.0;Ed Asner,Christopher Plummer,Jordan Nagai,Bob Peterson,Delroy Lindo,;Pete Docter +175000000;Animation,Family,Adventure,Science_Fiction;Monsters vs Aliens;36.167578000000006;2009-03-19;381509870;94.0;Seth Rogen,Reese Witherspoon,Hugh Laurie,Paul Rudd,Kiefer Sutherland,;Conrad Vernon +175000000;Action,Adventure,Crime,Fantasy,Science_Fiction;Suicide Squad;90.23791999999999;2016-08-02;745000000;123.0;Will Smith,Margot Robbie,Joel Kinnaman,Viola Davis,Jared Leto,;David Ayer +175000000;Adventure,Action,Thriller,Science_Fiction;G.I. Joe: The Rise of Cobra;32.852443;2009-08-04;302469017;118.0;Dennis Quaid,Channing Tatum,Marlon Wayans,Sienna Miller,Joseph Gordon-Levitt,;Stephen Sommers +175000000;Drama,Comedy,Animation,Family;Inside Out;128.65596399999998;2015-06-09;857611174;94.0;Amy Poehler,Phyllis Smith,Richard Kind,Bill Hader,Lewis Black,;Pete Docter +175000000;Family,Adventure,Drama,Fantasy;The Jungle Book;94.19931600000001;2016-04-07;966550600;106.0;Neel Sethi,Bill Murray,Ben Kingsley,Idris Elba,Scarlett Johansson,;Jon Favreau +175000000;Drama,Action,Adventure,Fantasy;47 Ronin;41.796339;2013-12-06;150962475;119.0;Keanu Reeves,Hiroyuki Sanada,Kou Shibasaki,Tadanobu Asano,Min Tanaka,;Carl Rinsch +175000000;Adventure,Drama,War;Troy;66.803149;2004-05-13;497409852;163.0;Brad Pitt,Orlando Bloom,Eric Bana,Brian Cox,Sean Bean,;Wolfgang Petersen +170000000;Adventure,Action,Science_Fiction;TRON: Legacy;73.79505;2010-12-10;400062763;125.0;Garrett Hedlund,Jeff Bridges,Olivia Wilde,Bruce Boxleitner,Yaya DaCosta,;Joseph Kosinski +170000000;Adventure,Drama,Family;Hugo;32.319043;2011-11-22;185770160;126.0;Ben Kingsley,Sacha Baron,Cohen Asa,Butterfield Chloë,Grace Moretz,Ray Winstone,;Martin Scorsese +170000000;Adventure,Fantasy,Drama;Snow White and the Huntsman;77.178973;2012-05-30;396600000;127.0;Kristen Stewart,Charlize Theron,Chris Hemsworth,Sam Claflin,Ian McShane,;Rupert Sanders +170000000;Science_Fiction,Action,Drama,Thriller;Dawn of the Planet of the Apes;243.79174300000003;2014-06-26;710644566;130.0;Andy Serkis,Jason Clarke,Gary Oldman,Keri Russell,Toby Kebbell,;Matt Reeves +170000000;Action,Science_Fiction,Adventure;Guardians of the Galaxy;481.09862400000003;2014-07-30;773328629;121.0;Chris Pratt,Zoe Saldana,Dave Bautista,Vin Diesel,Bradley Cooper,;James Gunn +170000000;Action,Adventure,Fantasy;Thor: The Dark World;99.499595;2013-10-29;644571402;112.0;Chris Hemsworth,Natalie Portman,Tom Hiddleston,Anthony Hopkins,Christopher Eccleston,;Alan Taylor +165000000;Comedy,Adventure,Fantasy,Animation,Family;Shrek Forever After;44.041185999999996;2010-05-16;752600867;93.0;Mike Myers,Eddie Murphy,Cameron Diaz,Antonio Banderas,Julie Andrews,;Mike Mitchell +165000000;Adventure,Family,Animation,Action,Comedy;Big Hero 6;203.73459;2014-10-24;652105443;102.0;Scott Adsit,Ryan Potter,Daniel Henney,T.J. Miller,Jamie Chung,;Chris Williams +165000000;Adventure,Animation,Family,Fantasy;The Polar Express;47.323228;2004-11-10;305875730;100.0;Tom Hanks,Michael Jeter,Nona Gaye,Peter Scolari,Eddie Deezen,;Robert Zemeckis +165000000;Action,Adventure,Science_Fiction;Independence Day: Resurgence;48.775723;2016-06-22;389681935;120.0;Liam Hemsworth,Jeff Goldblum,Bill Pullman,Maika Monroe,Sela Ward,;Roland Emmerich +165000000;Fantasy,Adventure,Animation,Family;How to Train Your Dragon;67.263269;2010-03-05;494878759;98.0;Jay Baruchel,Gerard Butler,Craig Ferguson,America Ferrera,Jonah Hill,;Chris Sanders +165000000;Adventure,Drama,Science_Fiction;Interstellar;724.247784;2014-11-05;675120017;169.0;Matthew McConaughey,Jessica Chastain,Anne Hathaway,Michael Caine,Casey Affleck,;Christopher Nolan +160000000;Action,Thriller,Science_Fiction,Mystery,Adventure;Inception;167.58371;2010-07-14;825532764;148.0;Leonardo DiCaprio,Joseph Gordon-Levitt,Ellen Page,Tom Hardy,Ken Watanabe,;Christopher Nolan +160000000;Action,Science_Fiction,Adventure;X-Men: First Class;3.195174;2011-05-24;353624124;132.0;James McAvoy,Michael Fassbender,Jennifer Lawrence,Kevin Bacon,Rose Byrne,;Matthew Vaughn +160000000;Action,Adventure,Science_Fiction;The Hunger Games: Mockingjay - Part 2;127.28442700000001;2015-11-18;653428261;137.0;Jennifer Lawrence,Josh Hutcherson,Liam Hemsworth,Woody Harrelson,Elizabeth Banks,;Francis Lawrence +160000000;Adventure,Action,Drama,Thriller;Poseidon;21.133748;2006-05-12;181674817;99.0;Kurt Russell,Richard Dreyfuss,Josh Lucas,Jacinda Barrett,Emmy Rossum,;Wolfgang Petersen +160000000;Fantasy,Adventure,Animation,Comedy,Family;Shrek the Third;42.986467;2007-05-17;798958165;93.0;Mike Myers,Eddie Murphy,Cameron Diaz,Julie Andrews,Antonio Banderas,;Chris Miller +160000000;Action,Adventure,Fantasy;Warcraft;63.148529;2016-05-25;433677183;123.0;Paula Patton,Travis Fimmel,Ben Foster,Robert Kazinsky,Dominic Cooper,;Duncan Jones +160000000;Adventure,Fantasy,Action;The 13th Warrior;27.220157;1999-08-27;61698899;102.0;Antonio Banderas,Vladimir Kulich,Dennis Storh0i,Daniel Southern,Clive Russell,;John McTiernan +160000000;Action,Adventure,Thriller;Speed 2: Cruise Control;23.336875;1997-06-13;164508066;121.0;Sandra Bullock,Jason Patric,Willem Dafoe,Temuera Morrison,Mike Hagerty,;Jan de Bont +155000000;Science_Fiction,Action,Thriller,Adventure;Terminator Genisys;202.04263500000002;2015-06-23;440603537;126.0;Arnold Schwarzenegger,Jason Clarke,Emilia Clarke,Jai Courtney,J.K. Simmons,;Alan Taylor +155000000;Adventure,Family,Fantasy;The Chronicles of Narnia: The Voyage of the Dawn Treader;49.661984000000004;2010-08-13;415686217;113.0;Skandar Keynes,Georgie Henley,Simon Pegg,Gary Sweet,Arthur Angel,;Michael Apted +150000000;Science_Fiction,Action,Adventure;Transformers: Revenge of the Fallen;21.939663;2009-06-19;836297228;150.0;Shia LaBeouf,Megan Fox,Josh Duhamel,Rainn Wilson,Tyrese Gibson,;Michael Bay +150000000;Adventure,Fantasy,Action,Romance;Prince of Persia: The Sands of Time;62.169881000000004;2010-05-19;335154643;116.0;Jake Gyllenhaal,Gemma Arterton,Ben Kingsley,Alfred Molina,Steve Toussaint,;Mike Newell +150000000;Fantasy,Drama,Thriller,Mystery,Romance;The Curious Case of Benjamin Button;60.269279000000004;2008-11-24;333932083;166.0;Cate Blanchett,Brad Pitt,Tilda Swinton,Julia Ormond,Elle Fanning,;David Fincher +150000000;Fantasy,Adventure,Action,Comedy,Drama;The Sorcerer's Apprentice;35.580815;2010-07-13;215283742;109.0;Nicolas Cage,Jay Baruchel,Monica Bellucci,Alfred Molina,Teresa Palmer,;Jon Turteltaub +150000000;Adventure,Science_Fiction,Action;Transformers;25.468493;2007-06-27;709709780;144.0;Shia LaBeouf,Josh Duhamel,Megan Fox,Rachael Taylor,Tyrese Gibson,;Michael Bay +150000000;Adventure,Fantasy,Family,Mystery;Harry Potter and the Order of the Phoenix;78.14439499999997;2007-06-28;938212738;138.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Michael Gambon,Ralph Fiennes,;David Yates +150000000;Adventure,Fantasy,Family;Harry Potter and the Goblet of Fire;101.250416;2005-11-05;895921036;157.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Ralph Fiennes,Michael Gambon,;Mike Newell +150000000;Fantasy,Action;Hancock;56.758410999999995;2008-07-01;624029371;92.0;Will Smith,Charlize Theron,Jason Bateman,Jae Head,Eddie Marsan,;Peter Berg +150000000;Drama,Horror,Action,Thriller,Science_Fiction;I Am Legend;70.867401;2007-12-14;585349010;101.0;Will Smith,Alice Braga,Charlie Tahan,Salli Richardson-Whitfield,Willow Smith,;Francis Lawrence +150000000;Adventure,Comedy,Family,Fantasy;Charlie and the Chocolate Factory;53.90559200000001;2005-07-13;474968763;115.0;Johnny Depp,Freddie Highmore,David Kelly,AnnaSophia Robb,Julia Winter,;Tim Burton +150000000;Animation,Comedy,Family,Fantasy;Ratatouille;65.677399;2007-06-22;623722818;111.0;Patton Oswalt,Ian Holm,Lou Romano,Brian Dennehy,Peter Sohn,;Jan Pinkava +150000000;Action,Crime,Drama;Batman Begins;115.040024;2005-06-10;374218673;140.0;Christian Bale,Michael Caine,Liam Neeson,Katie Holmes,Gary Oldman,;Christopher Nolan +150000000;Family,Animation;Madagascar: Escape 2 Africa;44.141021;2008-10-30;603900354;89.0;Ben Stiller,Jada Pinkett,Smith David,Schwimmer Chris,Rock Cedric,the Entertainer,;Eric Darnell +150000000;Adventure,Fantasy,Action,Comedy,Family;Night at the Museum: Battle of the Smithsonian;81.781591;2009-05-20;413106170;105.0;Ben Stiller,Amy Adams,Owen Wilson,Hank Azaria,Robin Williams,;Shawn Levy +150000000;Adventure,Action,Thriller,Science_Fiction;X-Men Origins: Wolverine;5.954333999999999;2009-04-28;373062864;107.0;Hugh Jackman,Liev Schreiber,Danny Huston,Lynn Collins,Ryan Reynolds,;Gavin Hood +150000000;Adventure,Action,Thriller,Science_Fiction;The Matrix Revolutions;73.313918;2003-11-05;424988211;129.0;Keanu Reeves,Laurence Fishburne,Carrie-Anne Moss,Hugo Weaving,Mary Alice,;Lilly Wachowski +150000000;Animation,Adventure,Family;Frozen;165.12536599999999;2013-11-27;1274219009;102.0;Kristen Bell,Idina Menzel,Jonathan Groff,Josh Gad,Santino Fontana,;Chris Buck +150000000;Adventure,Action,Thriller,Science_Fiction;The Matrix Reloaded;70.78591;2003-05-15;738599701;138.0;Keanu Reeves,Carrie-Anne Moss,Laurence Fishburne,Hugo Weaving,Helmut Bakaitis,;Lilly Wachowski +150000000;Action,Adventure,Science_Fiction,Thriller;Mad Max: Fury Road;434.27856399999996;2015-05-13;378858340;120.0;Tom Hardy,Charlize Theron,Nicholas Hoult,Hugh Keays-Byrne,Josh Helman,;George Miller +150000000;Thriller,Mystery;Angels & Demons;67.447636;2009-05-13;356613439;138.0;Tom Hanks,Ewan McGregor,Ayelet Zurer,Stellan Skarsgard,Pierfrancesco Favino,;Ron Howard +150000000;Adventure,Fantasy,Action;Thor;86.493424;2011-04-21;449326618;115.0;Chris Hemsworth,Natalie Portman,Tom Hiddleston,Anthony Hopkins,Stellan Skarsgard,;Kenneth Branagh +150000000;Animation,Family,Adventure,Comedy;Bolt;41.845878000000006;2008-11-21;309979994;98.0;John Travolta,Miley Cyrus,Susie Essman,Mark Walton,Malcolm McDowell,;Chris Williams +150000000;Fantasy,Action,Adventure,Family,Comedy;G-Force;26.710397999999998;2009-07-21;292817841;88.0;Sam Rockwell,Penélope Cruz,Tracy Morgan,Jon Favreau,Steve Buscemi,;Hoyt Yeatman +150000000;Adventure;Wrath of the Titans;44.927634999999995;2012-03-27;301000000;99.0;Sam Worthington,Liam Neeson,Ralph Fiennes,Edgar Ramirez,Toby Kebbell,;Jonathan Liebesman +150000000;Action,Adventure,Thriller;Mission: Impossible - Rogue Nation;114.52223700000002;2015-07-23;682330139;131.0;Tom Cruise,Rebecca Ferguson,Simon Pegg,Jeremy Renner,Ving Rhames,;Christopher McQuarrie +150000000;Family,Animation,Adventure,Comedy;Bee Movie;29.332905;2007-10-28;287594577;91.0;Jerry Seinfeld,Renée Zellweger,Jim Cummings,Matthew Broderick,Patrick Warburton,;Steve Hickner +150000000;Animation,Family;Kung Fu Panda 2;51.247321;2011-05-25;665692281;91.0;Jack Black,Angelina Jolie,Dustin Hoffman,Gary Oldman,Jackie Chan,;Jennifer Yuh Nelson +150000000;Action,Adventure,Family,Fantasy;The Last Airbender;33.769335999999996;2010-06-30;318502923;103.0;Noah Ringer,Nicola Peltz,Jackson Rathbone,Dev Patel,Shaun Toub,;M. Night Shyamalan +150000000;Adventure,Action,Thriller;Mission: Impossible III;63.079003;2006-05-03;397850012;126.0;Tom Cruise,Philip Seymour,Hoffman Ving,Rhames Billy,Crudup Jonathan,Rhys Meyers,;J.J. Abrams +150000000;Action,Drama,Thriller;White House Down;39.004588;2013-06-27;205366737;131.0;Channing Tatum,Jamie Foxx,Joey King,Maggie Gyllenhaal,Richard Jenkins,;Roland Emmerich +150000000;Adventure,Animation,Family;Mars Needs Moms;12.362599000000001;2011-03-09;38992758;88.0;Seth Green,Joan Cusack,Dan Fogler,Breckin Meyer,Elisabeth Harnois,;Simon Wells +150000000;Adventure,Family,Fantasy;Pan;48.03528;2015-09-24;128388320;111.0;Levi Miller,Garrett Hedlund,Hugh Jackman,Rooney Mara,Amanda Seyfried,;Joe Wright +150000000;Science_Fiction,Action,Adventure;Star Trek;73.61680799999998;2009-05-06;385680446;127.0;Chris Pine,Zachary Quinto,Leonard Nimoy,Eric Bana,Bruce Greenwood,;J.J. Abrams +150000000;Adventure;Master and Commander: The Far Side of the World;36.973031;2003-11-14;212011111;138.0;Russell Crowe,Paul Bettany,James D'Arcy,Billy Boyd,Joseph Morgan,;Peter Weir +150000000;Adventure,Action,Thriller;Casino Royale;88.935165;2006-11-14;599045960;144.0;Daniel Craig,Eva Green,Mads Mikkelsen,Judi Dench,Jeffrey Wright,;Martin Campbell +150000000;Adventure,Animation,Comedy,Family,Fantasy;Shrek 2;47.320801;2004-05-19;919838758;93.0;Mike Myers,Eddie Murphy,Cameron Diaz,Julie Andrews,Antonio Banderas,;Andrew Adamson +150000000;Animation,Family,Comedy;Chicken Little;47.973995;2005-11-04;314432665;81.0;Zach Braff,Joan Cusack,Dan Molina,Steve Zahn,Garry Marshall,;Mark Dindal +149000000;Adventure,Animation,Comedy,Family;Flushed Away;22.550135;2006-10-22;64459316;85.0;Hugh Jackman,Kate Winslet,Ian McKellen,Jean Reno,Bill Nighy,;David Bowers +145000000;Adventure,Action,Fantasy;The Mummy: Tomb of the Dragon Emperor;60.034162;2008-07-01;401128639;112.0;Brendan Fraser,Jet Li,John Hannah,Maria Bello,Luke Ford,;Rob Cohen +145000000;Animation,Adventure,Family;Mr. Peabody & Sherman;38.73494;2014-02-07;272912430;92.0;Ty Burrell,Max Charles,Ariel Winter,Allison Janney,Ellie Kemper,;Rob Minkoff +145000000;Action,Adventure,Animation,Comedy,Family;Kung Fu Panda 3;56.747978;2016-01-23;521170825;95.0;Jack Black,Bryan Cranston,Dustin Hoffman,Angelina Jolie,J.K. Simmons,;Jennifer Yuh Nelson +145000000;Action,Thriller,Adventure;Mission: Impossible - Ghost Protocol;77.77476999999998;2011-12-07;694713380;133.0;Tom Cruise,Jeremy Renner,Simon Pegg,Paula Patton,Anil Kapoor,;Brad Bird +145000000;Fantasy,Animation,Family;Rise of the Guardians;61.788035;2012-11-21;306941670;97.0;Chris Pine,Alec Baldwin,Jude Law,Isla Fisher,Hugh Jackman,;Peter Ramsey +145000000;Fantasy,Action,Adventure,Animation,Comedy;How to Train Your Dragon 2;100.21391;2014-06-12;609123048;102.0;Jay Baruchel,Gerard Butler,Kristen Wiig,Jonah Hill,Cate Blanchett,;Dean DeBlois +144000000;Action,Fantasy,Comedy;Ghostbusters;66.21806;2016-07-14;229147509;116.0;Melissa McCarthy,Kristen Wiig,Kate McKinnon,Leslie Jones,Chris Hemsworth,;Paul Feig +140000000;Action,Science_Fiction,Adventure;Iron Man;120.725053;2008-04-30;585174222;126.0;Robert Downey Jr.,Terrence Howard,Jeff Bridges,Shaun Toub,Gwyneth Paltrow;Jon Favreau +140000000;Adventure,Action,Thriller;Die Another Day;54.159392000000004;2002-11-17;431971116;133.0;Pierce Brosnan,Halle Berry,Rosamund Pike,Rick Yune,Toby Stephens,;Lee Tamahori +140000000;Action,Adventure,Comedy,Science_Fiction;Men in Black II;91.332849;2002-07-03;441818803;88.0;Tommy Lee Jones,Will Smith,Rip Torn,Lara Flynn Boyle, Johnny Knoxville;Barry Sonnenfeld +140000000;Drama,Action,War,History;The Last Samurai;52.341226;2003-12-05;456758981;154.0;Tom Cruise,Ken Watanabe,William Atherton,Chad Lindberg,Billy Connolly,;Edward Zwick +140000000;Adventure,Drama,Action;Exodus: Gods and Kings;101.599427;2014-12-03;268031828;150.0;Christian Bale,Joel Edgerton,John Turturro,Aaron Paul,Ben Mendelsohn,;Ridley Scott +140000000;Fantasy;Gods of Egypt;56.257249;2016-02-25;150680864;127.0;Brenton Thwaites,Nikolaj Coster-Waldau,Gerard Butler,Courtney Eaton,Elodie Yung,;Alex Proyas +140000000;Action,Adventure,Comedy,Crime,Thriller;Lethal Weapon 4;24.855701;1998-07-10;285444603;127.0;Mel Gibson,Danny Glover,Joe Pesci,Rene Russo,Jet Li,;Richard Donner +140000000;Action,Adventure,Science_Fiction;Captain America: The First Avenger;74.50624599999998;2011-07-22;370569774;124.0;Chris Evans,Hugo Weaving,Tommy Lee Jones,Hayley Atwell,Sebastian Stan;Joe Johnston +140000000;Adventure,Family,Fantasy;The BFG;44.19092;2016-06-01;183345589;120.0;Ruby Barnhill,Mark Rylance,Rebecca Hall,Jemaine Clement,Bill Hader,;Steven Spielberg +140000000;Adventure,Fantasy,Action;Pirates of the Caribbean: The Curse of the Black Pearl;271.972889;2003-07-09;655011224;143.0;Johnny Depp,Geoffrey Rush,Orlando Bloom,Keira Knightley,Jack Davenport,;Gore Verbinski +139000000;Fantasy,Action;Spider-Man;82.502566;2002-05-01;821708551;121.0;Tobey Maguire,Willem Dafoe,Kirsten Dunst,James Franco,Cliff Robertson,;Sam Raimi +137000000;Drama,Action,Science_Fiction;Hulk;34.981698;2003-06-19;245360480;138.0;Eric Bana,Jennifer Connelly,Sam Elliott,Josh Lucas,Nick Nolte,;Ang Lee +137000000;Adventure,Action,Animation,Fantasy,Science_Fiction;Final Fantasy: The Spirits Within;26.074907999999997;2001-07-02;85131830;106.0;Donald Sutherland,Ming-Na Wen,Alec Baldwin,Ving Rhames,Steve Buscemi,;Hironobu Sakaguchi +135000000;Action;Stealth;17.88953;2005-07-28;76932943;121.0;Josh Lucas,Jessica Biel,Jamie Foxx,Sam Shepard,Richard Roxburgh,;Rob Cohen +135000000;Adventure,Action,Thriller;The World Is Not Enough;39.604363;1999-11-08;361832400;128.0;Pierce Brosnan,Sophie Marceau,Robert Carlyle,Denise Richards,Robbie Coltrane,;Michael Apted +135000000;Western,Drama,Adventure,Thriller;The Revenant;100.635882;2015-12-25;532950503;156.0;Leonardo DiCaprio,Tom Hardy,Will Poulter,Domhnall Gleeson,Paul Anderson,;Alejandro Gonzalez Iu1arritu +135000000;Animation,Comedy,Family,Western,Adventure;Rango;29.913529999999998;2011-03-02;245724603;107.0;Johnny Depp,Isla Fisher,Ned Beatty,Bill Nighy,Alfred Molina,;Gore Verbinski +135000000;Adventure,Animation,Comedy,Family,Fantasy;The Croods;64.18332099999999;2013-03-20;585178928;98.0;Nicolas Cage,Emma Stone,Ryan Reynolds,Catherine Keener,Cloris Leachman,;Chris Sanders +135000000;Fantasy,Action,Adventure,Comedy;Teenage Mutant Ninja Turtles: Out of the Shadows;39.873791;2016-06-01;245623848;112.0;Megan Fox,Stephen Amell,Will Arnett,Laura Linney,Pete Ploszek,;Dave Green +132000000;Family,Animation,Adventure,Comedy;Penguins of Madagascar;84.366984;2014-11-22;373552094;92.0;Tom McGrath,Chris Miller,Christopher Knights,Conrad Vernon,John Malkovich,;Eric Darnell +132000000;Adventure,Thriller,Science_Fiction;War of the Worlds;48.572726;2005-06-28;591739379;116.0;Tom Cruise,Dakota Fanning,Miranda Otto,Justin Chatwin,Tim Robbins,;Steven Spielberg +130000000;Adventure,Action,Science_Fiction,Thriller;G.I. Joe: Retaliation;59.325589;2013-03-26;371876278;110.0;Dwayne Johnson,D.J. Cotrona,Adrianne Palicki,Bruce Willis,Ray Park,;Jon M. Chu +130000000;Animation,Comedy,Family;Happy Feet Two;17.7735;2011-11-17;150406466;100.0;Elijah Wood,Robin Williams,Pink E.G.,Daily Johnny,A. Sanchez,;George Miller +130000000;Adventure,Animation,Family,Comedy;Kung Fu Panda;84.68964799999998;2008-06-04;631744560;90.0;Jack Black,Dustin Hoffman,Angelina Jolie,Jackie Chan,Lucy Liu,;Mark Osborne +130000000;Science_Fiction,Action,Adventure;Ant-Man;120.09361000000001;2015-07-14;519311965;117.0;Paul Rudd,Michael Douglas,Evangeline Lilly,Corey Stoll,Bobby Cannavale,;Peyton Reed +130000000;Adventure,Action,Science_Fiction;The Hunger Games: Catching Fire;76.310119;2013-11-15;847423452;146.0;Jennifer Lawrence,Josh Hutcherson,Liam Hemsworth,Woody Harrelson,Elizabeth Banks,;Francis Lawrence +130000000;Adventure,Action,Comedy,Thriller,Crime;Bad Boys II;38.068736;2003-07-18;273339556;147.0;Martin Lawrence,Will Smith,Jordi Mollà,Gabrielle Union,Peter Stormare,;Michael Bay +130000000;Adventure,Animation,Mystery;The Adventures of Tintin;89.938296;2011-10-25;371940071;107.0;Jamie Bell,Andy Serkis,Daniel Craig,Nick Frost,Simon Pegg,;Steven Spielberg +130000000;Adventure,Fantasy,Family;Harry Potter and the Prisoner of Azkaban;79.679601;2004-05-31;789804554;141.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Gary Oldman,David Thewlis,;Alfonso Cuaru3n +130000000;Drama;Australia;28.840996999999998;2008-11-18;49554002;165.0;Nicole Kidman,Hugh Jackman,Essie Davis,David Wenham,Bryan Brown,;Baz Luhrmann +130000000;Science_Fiction,Action,Adventure;After Earth;42.840582;2013-05-30;243843127;100.0;Jaden Smith,Will Smith,Sophie Okonedo,Zoë Kravitz,Glenn Morshower,;M. Night Shyamalan +130000000;Animation,Action,Comedy,Family,Science_Fiction;Megamind;68.757242;2010-10-28;321887208;95.0;Will Ferrell,Brad Pitt,Tina Fey,Jonah Hill,David Cross,;Tom McGrath +130000000;Fantasy,Action,Comedy,Crime;R.I.P.D.;39.448066;2013-07-18;61648500;96.0;Jeff Bridges,Ryan Reynolds,Kevin Bacon,Stephanie Szostak,Mary-Louise Parker,;Robert Schwentke +130000000;Action,Thriller;The Bourne Legacy;90.33681;2012-08-08;276572938;120.0;Jeremy Renner,Rachel Weisz,Edward Norton,Scott Glenn,Stacy Keach,;Tony Gilroy +130000000;Adventure,Fantasy,Action,Thriller;4: Rise of the Silver Surfer;60.810722999999996;2007-06-13;289047763;92.0;Ioan Gruffudd,Jessica Alba,Chris Evans,Michael Chiklis,Julian McMahon,;Tim Story +130000000;Science_Fiction,Adventure,Mystery;Prometheus;68.889395;2012-05-30;403170142;124.0;Noomi Rapace,Michael Fassbender,Guy Pearce,Idris Elba,Logan Marshall-Green,;Ridley Scott +130000000;Drama,Action,Adventure,History,War;Kingdom of Heaven;44.490453;2005-05-03;211643158;144.0;Orlando Bloom,Eva Green,Jeremy Irons,Marton Csokas,Brendan Gleeson,;Ridley Scott +130000000;Action,Adventure,History,Romance,Drama;Pompeii;50.561849;2014-02-18;117831631;105.0;Kit Harington,Carrie-Anne Moss,Emily Browning,Adewale Akinnuoye-Agbaje,Jessica Lucas,;Paul W.S. Anderson +127000000;Adventure,Comedy,Fantasy,Family;Night at the Museum: Secret of the Tomb;115.597753;2014-12-17;349424282;97.0;Ben Stiller,Rami Malek,Rebel Wilson,Robin Williams,Owen Wilson,;Shawn Levy +126000000;Action,Thriller,Science_Fiction,Adventure;The Island;37.68056;2005-07-20;162949164;136.0;Ewan McGregor,Scarlett Johansson,Djimon Hounsou,Sean Bean,Steve Buscemi,;Michael Bay +125000000;Drama,Adventure;Noah;46.115758;2014-03-20;362637473;139.0;Russell Crowe,Jennifer Connelly,Emma Watson,Logan Lerman,Anthony Hopkins,;Darren Aronofsky +125000000;Adventure,Fantasy,Family;Harry Potter and the Philosopher's Stone;109.984351;2001-11-16;976475550;152.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Richard Harris,Tom Felton,;Chris Columbus +125000000;Science_Fiction,Adventure,Thriller;The Hunger Games: Mockingjay - Part 1;206.227151;2014-11-18;752100229;123.0;Jennifer Lawrence,Josh Hutcherson,Liam Hemsworth,Woody Harrelson,Donald Sutherland,;Francis Lawrence +125000000;Thriller,Mystery;The Da Vinci Code;45.313196999999995;2006-05-17;767820459;149.0;Tom Hanks,Audrey Tautou,Ian McKellen,Paul Bettany,Jean Reno,;Ron Howard +125000000;Adventure,Action,Crime,Mystery;Sherlock Holmes: A Game of Shadows;81.49962099999998;2011-11-22;334615000;129.0;Robert Downey Jr.,Jude Law,Jared Harris,Noomi Rapace,Kelly Reilly;Guy Ritchie +125000000;Adventure,Fantasy,Action;Clash of the Titans;47.686442;2010-04-01;232713139;106.0;Sam Worthington,Liam Neeson,Ralph Fiennes,Gemma Arterton,Jason Flemyng,;Louis Leterrier +125000000;Action,Crime,Fantasy;Batman & Robin;50.073575;1997-06-20;238207122;125.0;George Clooney,Chris O'Donnell,Arnold Schwarzenegger,Uma Thurman,Alicia Silverstone,;Joel Schumacher +125000000;Adventure,Action,Thriller;Mission: Impossible II;54.931334;2000-05-24;546388105;123.0;Tom Cruise,Dougray Scott,Thandie Newton,Ving Rhames,Richard Roxburgh,;John Woo +125000000;Science_Fiction,Action,Adventure,Fantasy,Comedy;Teenage Mutant Ninja Turtles;143.350376;2014-08-07;477200000;101.0;Megan Fox,Will Arnett,William Fichtner,Alan Ritchson,Noel Fisher,;Jonathan Liebesman +123000000;Family,Comedy,Fantasy;How the Grinch Stole Christmas;45.419668;2000-11-17;345141403;104.0;Jim Carrey,Taylor Momsen,Jeffrey Tambor,Christine Baranski,Bill Irwin,;Ron Howard +120000000;Adventure,Fantasy,Drama,Romance;The Twilight Saga: Breaking Dawn - Part 2;99.687084;2012-11-13;829000000;115.0;Kristen Stewart,Robert Pattinson,Taylor Lautner,Peter Facinelli,Elizabeth Reaser,;Bill Condon +120000000;Adventure,Drama,Action;Life of Pi;51.328145;2012-11-20;609016565;127.0;Suraj Sharma,Irrfan Khan,Ayush Tandon,Gautam Belur,Adil Hussain,;Ang Lee +120000000;Action,Thriller;Jason Bourne;62.641286;2016-07-27;415484914;123.0;Matt Damon,Alicia Vikander,Tommy Lee Jones,Vincent Cassel,Julia Stiles;Paul Greengrass +120000000;Action,Adventure,Comedy;Charlie's Angels: Full Throttle;33.616115;2003-06-27;259175788;106.0;Cameron Diaz,Drew Barrymore,Lucy Liu,Bernie Mac,Robert Patrick,;McG +120000000;Action,Family,Science_Fiction;Speed Racer;17.060695000000006;2008-05-09;93945766;135.0;Emile Hirsch,Christina Ricci,Matthew Fox,Susan Sarandon,Scott Porter,;Lilly Wachowski +120000000;Comedy,Drama,Romance;How Do You Know;11.137655;2010-12-17;48668907;121.0;Reese Witherspoon,Paul Rudd,Owen Wilson,Jack Nicholson,Kathryn Hahn,;James L. Brooks +120000000;Action,Science_Fiction,Adventure,Mystery;Oblivion;67.698004;2013-04-10;286168572;124.0;Tom Cruise,Morgan Freeman,Olga Kurylenko,Andrea Riseborough,Nikolaj Coster-Waldau,;Joseph Kosinski +120000000;Action,Crime,Comedy;The Green Hornet;31.70360800000001;2011-01-12;227817248;119.0;Seth Rogen,Jay Chou,Christoph Waltz,Cameron Diaz,Edward Furlong,;Michel Gondry +120000000;Action,Science_Fiction;I, Robot;95.914473;2004-07-15;347234916;115.0;Will Smith,Bridget Moynahan,Alan Tudyk,James Cromwell,Bruce Greenwood,;Alex Proyas +120000000;Animation,Adventure,Comedy,Family;Cars;82.643036;2006-06-08;461983149;117.0;Owen Wilson,Paul Newman,Bonnie Hunt,Larry the,Cable Guy,Tony Shalhoub,;John Lasseter +120000000;Adventure,Animation,Comedy,Family;A Bug's Life;87.350802;1998-11-25;363258859;95.0;Kevin Spacey,Julia Louis-Dreyfus,Hayden Panettiere,Phyllis Diller,Bonnie Hunt,;Andrew Stanton +117000000;Action,Comedy;Knight and Day;44.906918;2010-06-15;261930431;109.0;Tom Cruise,Cameron Diaz,Peter Sarsgaard,Viola Davis,Jordi Mollà,;James Mangold +115000000;Science_Fiction,Action,Drama,Thriller;Elysium;67.33766999999999;2013-08-07;286140700;109.0;Matt Damon,Jodie Foster,Sharlto Copley,Alice Braga,Diego Luna,;Neill Blomkamp +115000000;Animation,Comedy,Family;Monsters, Inc.;106.815545;2001-11-01;562816256;92.0;John Goodman,Billy Crystal,Mary Gibbs,Steve Buscemi,James Coburn,;Pete Docter +115000000;Adventure,Action,Science_Fiction;Star Wars: Episode I - The Phantom Menace;54.035265;1999-05-19;924317558;136.0;Liam Neeson,Ewan McGregor,Natalie Portman,Jake Lloyd,Ian McDiarmid,;George Lucas +115000000;Drama,Action,History,War;Windtalkers;18.714197;2002-06-14;77628265;134.0;Nicolas Cage,Adam Beach,Peter Stormare,Noah Emmerich,Mark Ruffalo,;John Woo +115000000;Action,Adventure,Drama;The Huntsman: Winter's War;60.467983999999994;2016-04-06;164602163;114.0;Chris Hemsworth,Charlize Theron,Emily Blunt,Jessica Chastain,Nick Frost,;Cedric Nicolas-Troyan +115000000;Adventure,Fantasy,Action,Thriller;Lara Croft: Tomb Raider;41.498631;2001-06-11;274703340;100.0;Angelina Jolie,Jon Voight,Iain Glen,Noah Taylor,Daniel Craig,;Simon West +112000000;Comedy;Gulliver's Travels;22.845143;2010-12-25;237382724;85.0;Jack Black,Amanda Peet,Emily Blunt,Jason Segel,Chris O'Dowd,;Rob Letterman +110000000;Action,Mystery,Thriller;Salt;48.829437;2010-07-21;293329073;100.0;Angelina Jolie,Liev Schreiber,Chiwetel Ejiofor,Daniel Olbrychski,August Diehl,;Phillip Noyce +110000000;Adventure,Action,Science_Fiction,Thriller;X2;2.871739;2003-04-24;407711549;133.0;Patrick Stewart,Hugh Jackman,Ian McKellen,Halle Berry,Famke Janssen,;Bryan Singer +110000000;Thriller,Action,Fantasy,Horror;Ghost Rider;46.834703999999995;2007-02-16;228738393;114.0;Nicolas Cage,Eva Mendes,Wes Bentley,Donal Logue,Sam Elliott,;Mark Steven Johnson +110000000;Action,Drama,Thriller;San Andreas;100.412364;2015-05-27;470490832;114.0;Dwayne Johnson,Alexandra Daddario,Carla Gugino,Ioan Gruffudd,Archie Panjabi,;Brad Peyton +110000000;Adventure,Action,Thriller;Tomorrow Never Dies;42.887121;1997-12-11;333011068;119.0;Pierce Brosnan,Jonathan Pryce,Michelle Yeoh,Teri Hatcher,Ricky Jay,;Roger Spottiswoode +110000000;Drama,History,War,Action;The Patriot;23.657284;2000-06-28;215294342;165.0;Mel Gibson,Heath Ledger,Joely Richardson,Jason Isaacs,Tchéky Karyo,;Roland Emmerich +110000000;Thriller,Crime;Ocean's Twelve;76.840712;2004-12-09;362744280;125.0;George Clooney,Brad Pitt,Catherine Zeta-Jones,Julia Roberts,Andy Garcia,;Steven Soderbergh +110000000;Action,Comedy,Drama,Thriller;Mr. & Mrs. Smith;44.635452;2005-06-07;478207520;120.0;Angelina Jolie,Brad Pitt,Vince Vaughn,Adam Brody,Kerry Washington,;Doug Liman +110000000;Adventure,Science_Fiction,Thriller;Insurgent;103.71838699999999;2015-03-18;295238201;119.0;Shailene Woodley,Theo James,Kate Winslet,Ansel Elgort,Miles Teller,;Robert Schwentke +110000000;Action,War;300: Rise of an Empire;71.51059599999998;2014-03-05;337580051;102.0;Sullivan Stapleton,Eva Green,Lena Headey,Callan Mulvey,David Wenham,;Noam Murro +110000000;Adventure,Science_Fiction;Allegiant;86.105615;2016-03-09;179246868;121.0;Shailene Woodley,Theo James,Zoë Kravitz,Miles Teller,Naomi Watts,;Robert Schwentke +110000000;Action,Science_Fiction,Drama;Real Steel;37.19504600000001;2011-09-28;299268508;127.0;Hugh Jackman,Dakota Goyo,Evangeline Lilly,Anthony Mackie,Kevin Durand,;Shawn Levy +110000000;Science_Fiction,Action,Adventure;Ender's Game;45.94834;2013-10-23;125537191;114.0;Asa Butterfield,Harrison Ford,Hailee Steinfeld,Abigail Breslin,Ben Kingsley,;Gavin Hood +110000000;Action,Thriller;Live Free or Die Hard;48.933370000000004;2007-06-20;383531464;128.0;Bruce Willis,Justin Long,Timothy Olyphant,Cliff Curtis,Maggie Q,;Len Wiseman +108000000;Drama,Adventure,Science_Fiction;The Martian;167.93287;2015-09-30;630161890;141.0;Matt Damon,Jessica Chastain,Kristen Wiig,Jeff Daniels,Michael Peu1a,;Ridley Scott +105000000;Drama,Romance;The Great Gatsby;61.196070999999996;2013-05-10;351040419;143.0;Leonardo DiCaprio,Tobey Maguire,Carey Mulligan,Joel Edgerton,Elizabeth Debicki,;Baz Luhrmann +105000000;Action,Science_Fiction;The Chronicles of Riddick;27.835435999999998;2004-06-11;115772733;119.0;Vin Diesel,Thandie Newton,Karl Urban,Colm Feore,Linus Roache,;David Twohy +105000000;Science_Fiction,Thriller,Drama;Gravity;110.153618;2013-09-27;716392705;91.0;Sandra Bullock,George Clooney,Ed Harris,Orto Ignatiussen,Phaldut Sharma,;Alfonso Cuaru3n +105000000;Adventure,Action,Thriller,Science_Fiction;Starship Troopers;58.782359;1997-11-06;121214377;129.0;Casper Van,Dien Dina,Meyer Denise,Richards Jake,Busey Neil,Patrick Harris,;Paul Verhoeven +105000000;Action,Crime,Thriller;Point Break;33.507289;2015-12-03;133718711;114.0;Edgar Ramirez,Luke Bracey,Teresa Palmer,Delroy Lindo,Ray Winstone,;Ericson Core +103000000;Animation,Adventure,Comedy,Family;Rio 2;42.400240000000004;2014-03-19;500188435;102.0;Jesse Eisenberg,Anne Hathaway,Leslie Mann,Jamie Foxx,Andy Garcia,;Carlos Saldanha +103000000;Action,Drama,Adventure;Gladiator;95.301296;2000-05-01;457640427;155.0;Russell Crowe,Joaquin Phoenix,Connie Nielsen,Oliver Reed,Richard Harris,;Ridley Scott +102000000;Drama,Science_Fiction;Cloud Atlas;73.872343;2012-10-26;130482868;172.0;Tom Hanks,Halle Berry,Jim Broadbent,Hugo Weaving,Jim Sturgess,;Tom Tykwer +102000000;Action,Crime,Thriller;Swordfish;36.788745;2001-06-07;147080413;99.0;John Travolta,Hugh Jackman,Halle Berry,Don Cheadle,Sam Shepard,;Dominic Sena +100000000;Comedy;Fun with Dick and Jane;25.159167999999998;2005-12-21;202026112;90.0;Jim Carrey,Téa Leoni,Alec Baldwin,Richard Jenkins,Angie Harmon,;Dean Parisot +100000000;Adventure,Fantasy,Family;Harry Potter and the Chamber of Secrets;132.397737;2002-11-13;876688482;161.0;Daniel Radcliffe,Rupert Grint,Emma Watson,Richard Harris,Alan Rickman,;Chris Columbus +100000000;Thriller,Science_Fiction,Action,Adventure;Planet of the Apes;51.188633;2001-07-25;362211740;119.0;Mark Wahlberg,Tim Roth,Helena Bonham,Carter Michael,Clarke Duncan,Kris Kristofferson,;Tim Burton +100000000;Action,Thriller,Science_Fiction;Terminator 2: Judgment Day;101.74155;1991-07-01;520000000;137.0;Arnold Schwarzenegger,Linda Hamilton,Robert Patrick,Edward Furlong,Michael Edwards,;James Cameron +100000000;Drama,Crime;American Gangster;42.361215;2007-11-02;266465037;157.0;Denzel Washington,Russell Crowe,Chiwetel Ejiofor,Josh Brolin,Lymari Nadal,;Ridley Scott +100000000;Thriller,Drama,Crime;The Taking of Pelham 1 2 3;40.597856;2009-06-11;150166126;106.0;Denzel Washington,John Travolta,Luis Guzman,Victor Gojcaj,John Turturro,;Tony Scott +100000000;Action,Drama,Mystery,Thriller;Eraser;24.507987;1996-06-21;242295562;115.0;Arnold Schwarzenegger,James Caan,Vanessa Williams,James Coburn,Robert Pastorelli,;Chuck Russell +100000000;Drama,Animation,Family;The Hunchback of Notre Dame;46.727940999999994;1996-06-21;100138851;91.0;Tom Hulce,Demi Moore,Tony Jay,Kevin Kline,Paul Kandel,;Gary Trousdale +100000000;Adventure,Animation,Comedy,Family,Fantasy;The Emperor's New Groove;51.113717;2000-12-09;169327687;78.0;David Spade,John Goodman,Eartha Kitt,Patrick Warburton,Wendie Malick,;Mark Dindal +100000000;Action,Adventure,Thriller;The Expendables 2;53.73289200000001;2012-08-08;312573423;103.0;Sylvester Stallone,Jason Statham,Dolph Lundgren,Bruce Willis,Arnold Schwarzenegger,;Simon West +100000000;Adventure,Action,Thriller,Mystery;National Treasure;58.849256000000004;2004-11-19;347451894;131.0;Nicolas Cage,Diane Kruger,Justin Bartha,Sean Bean,Jon Voight,;Jon Turteltaub +100000000;Fantasy,Action,Adventure,Family;Eragon;30.863434;2006-12-14;249288105;104.0;Ed Speleers,Jeremy Irons,Sienna Guillory,Robert Carlyle,Djimon Hounsou,;Stefen Fangmeier +100000000;Family,Fantasy;Where the Wild Things Are;31.58621500000001;2009-10-16;100086793;101.0;Max Records,Catherine Keener,Lauren Ambrose,James Gandolfini,Catherine O'Hara,;Spike Jonze +100000000;Animation,Adventure,Family,Fantasy;Epic;36.711378;2013-05-15;268426634;102.0;Josh Hutcherson,Amanda Seyfried,Colin Farrell,Jason Sudeikis,Aziz Ansari,;Chris Wedge +100000000;Action,Thriller,Romance;The Tourist;41.426678;2010-12-08;278731369;103.0;Johnny Depp,Angelina Jolie,Paul Bettany,Timothy Dalton,Steven Berkoff,;Florian Henckel von Donnersmarck +100000000;Action,Fantasy,Horror,Mystery;End of Days;20.652943;1999-11-24;211989043;121.0;Arnold Schwarzenegger,Gabriel Byrne,Kevin Pollak,Robin Tunney,CCH Pounder,;Peter Hyams +100000000;Drama,Thriller,Action;Blood Diamond;52.792678;2006-12-07;170877916;143.0;Leonardo DiCaprio,Djimon Hounsou,Jennifer Connelly,Kagiso Kuypers,Arnold Vosloo,;Edward Zwick +100000000;Crime,Drama,Comedy;The Wolf of Wall Street;95.00793399999999;2013-12-25;392000694;180.0;Leonardo DiCaprio,Jonah Hill,Margot Robbie,Kyle Chandler,Rob Reiner,;Martin Scorsese +100000000;Action,Crime,Fantasy;Batman Forever;48.205606;1995-05-31;336529144;121.0;Val Kilmer,Tommy Lee Jones,Jim Carrey,Nicole Kidman,Chris O'Donnell;Joel Schumacher +100000000;Action,Crime;Catwoman;32.271938;2004-07-22;82102379;104.0;Halle Berry,Benjamin Bratt,Sharon Stone,Lambert Wilson,Frances Conroy,;Pitof +100000000;Action,Adventure;Hercules;76.842247;2014-07-23;243400000;99.0;Dwayne Johnson,Ian McShane,John Hurt,Rufus Sewell,Aksel Hennie,;Brett Ratner +100000000;Adventure,Comedy,Science_Fiction;Land of the Lost;19.38841;2009-06-05;68688831;102.0;Will Ferrell,Anna Friel,Danny McBride,Jorma Taccone,Matt Lauer,;Brad Silberling +100000000;Thriller,Drama,Adventure,Action,History;In the Heart of the Sea;50.767332;2015-11-20;93820758;122.0;Chris Hemsworth,Benjamin Walker,Cillian Murphy,Brendan Gleeson,Ben Whishaw,;Ron Howard +100000000;Action,Comedy,Science_Fiction;The Adventures of Pluto Nash;12.092241;2002-08-15;7103973;95.0;Eddie Murphy,Randy Quaid,Rosario Dawson,Joe Pantoliano,Jay Mohr,;Ron Underwood +100000000;War,Action,Adventure,Drama,Thriller;Green Zone;30.254021;2010-03-11;94882889;115.0;Matt Damon,Greg Kinnear,Brendan Gleeson,Amy Ryan,Jason Isaacs,;Paul Greengrass +100000000;Drama,History,Crime;Gangs of New York;46.160047999999996;2002-12-14;193772504;167.0;Leonardo DiCaprio,Daniel Day-Lewis,Cameron Diaz,Liam Neeson,Brendan Gleeson,;Martin Scorsese +100000000;Thriller,Science_Fiction,Drama,Mystery;Transcendence;58.991388;2014-04-16;103039258;119.0;Johnny Depp,Paul Bettany,Rebecca Hall,Kate Mara,Morgan Freeman,;Wally Pfister +100000000;Action,Thriller;Unstoppable;37.698465;2010-11-04;167805466;98.0;Denzel Washington,Chris Pine,Rosario Dawson,Ethan Suplee,Kevin Corrigan,;Tony Scott +100000000;Drama,Horror,Mystery,Thriller;What Lies Beneath;15.835672;2000-07-21;155464351;130.0;Harrison Ford,Michelle Pfeiffer,Diana Scarwid,James Remar,Miranda Otto,;Robert Zemeckis +100000000;Animation,Comedy,Family;Cloudy with a Chance of Meatballs;46.781182;2009-09-17;242988466;90.0;Bill Hader,Anna Faris,James Caan,Mr. T,Benjamin Bratt,;Phil Lord +100000000;Drama;Ben-Hur;29.608321999999998;2016-08-17;94061311;125.0;Jack Huston,Toby Kebbell,Rodrigo Santoro,Nazanin Boniadi,Ayelet Zurer,;Timur Bekmambetov +100000000;Comedy,Science_Fiction;Bicentennial Man;24.939295;1999-12-17;93700000;131.0;Robin Williams,Sam Neill,Embeth Davidtz,Oliver Platt,Kiersten Warren,;Chris Columbus +100000000;Drama,History,Thriller;K-19: The Widowmaker;15.625948999999999;2002-07-19;35168966;138.0;Harrison Ford,Liam Neeson,Peter Sarsgaard,Joss Ackland,John Shrapnel,;Kathryn Bigelow +100000000;Animation,Comedy;Happy Feet;37.272385;2006-11-16;384335608;108.0;Elijah Wood,Robin Williams,Brittany Murphy,Hugh Jackman,Nicole Kidman,;George Miller +100000000;Western,Adventure;Hidalgo;16.759252;2004-03-05;108103450;136.0;Viggo Mortensen,Zuleikha Robinson,Omar Sharif,Adam Alexi-Malle,Louise Lombard,;Joe Johnston +100000000;Action,Adventure,Fantasy,Science_Fiction,Thriller;Dragonball Evolution;21.677732000000002;2009-04-01;0;85.0;Chow Yun-fat,Justin Chatwin,Joon Park,Jamie Chung,Emmy Rossum,;James Wong +98000000;Adventure,Action,Fantasy;The Mummy Returns;41.862983;2001-04-28;433013274;130.0;Brendan Fraser,Rachel Weisz,John Hannah,Arnold Vosloo,Oded Fehr,;Stephen Sommers +98000000;Action,Adventure;Cutthroat Island;7.029308;1995-12-22;10017322;119.0;Geena Davis,Matthew Modine,Frank Langella,Maury Chaykin,Patrick Malahide,;Renny Harlin +97250400;Fantasy,Adventure,Comedy,Family;Astérix aux Jeux Olympiques;20.344364000000002;2008-01-13;132900000;116.0;Clovis Cornillac,Gérard Depardieu,Franck Dubosc,José Garcia,Stéphane Rousseau,;Thomas Langmann +95000000;Adventure,Fantasy;Seventh Son;63.628459;2014-12-12;114178613;102.0;Jeff Bridges,Julianne Moore,Ben Barnes,Alicia Vikander,Kit Harington,;Sergei Bodrov +95000000;Action,Science_Fiction,Thriller;Hollow Man;28.200874;2000-08-04;190213455;112.0;Kevin Bacon,Elisabeth Shue,Josh Brolin,Kim Dickens,Rhona Mitra,;Paul Verhoeven +95000000;Action,Adventure,Fantasy,Thriller;Lara Croft Tomb Raider: The Cradle of Life;56.81105600000001;2003-07-21;156505388;117.0;Angelina Jolie,Gerard Butler,Noah Taylor,Djimon Hounsou,Til Schweiger,;Jan de Bont +95000000;Action,Adventure;The Mask of Zorro;31.086790999999998;1998-07-16;250288523;136.0;Antonio Banderas,Anthony Hopkins,Catherine Zeta-Jones,Stuart Wilson,Diego Sieres,;Martin Campbell +94000000;Drama,History,War;金陵十三釵;12.516546;2011-12-15;95311434;145.0;Christian Bale,Ni Ni,Tong Dawei,Zhang Xinyi,Shigeo Kobayashi,;Zhang Yimou +94000000;Animation,Family;Finding Nemo;85.688789;2003-05-30;940335536;100.0;Albert Brooks,Ellen DeGeneres,Alexander Gould,Willem Dafoe,Brad Garrett,;Andrew Stanton +94000000;Adventure,Fantasy,Action;The Lord of the Rings: The Return of the King;123.63033200000001;2003-12-01;1118888979;201.0;Elijah Wood,Ian McKellen,Viggo Mortensen,Liv Tyler,Orlando Bloom,;Peter Jackson +93000000;Adventure,Fantasy,Action;The Lord of the Rings: The Fellowship of the Ring;138.049577;2001-12-18;871368364;178.0;Elijah Wood,Ian McKellen,Cate Blanchett,Orlando Bloom,Sean Bean,;Peter Jackson +93000000;Thriller,Action,Drama,Science_Fiction;Rise of the Planet of the Apes;138.433168;2011-08-03;482860185;105.0;James Franco,Freida Pinto,John Lithgow,Brian Cox,Tom Felton,;Rupert Wyatt +92620000;Drama,Science_Fiction;Metropolis;32.351527000000004;1927-01-10;650422;153.0;Brigitte Helm,Alfred Abel,Gustav Frohlich,Rudolf Klein-Rogge,Fritz Rasp,;Fritz Lang +92000000;Action,History,War;Black Hawk Down;44.455166;2001-12-28;172989651;144.0;Josh Hartnett,Ewan McGregor,Jason Isaacs,Tom Sizemore,William Fichtner,;Ridley Scott +92000000;Action,Adventure,Animation,Family;The Incredibles;77.817571;2004-11-05;631442092;115.0;Craig T.,Nelson Holly,Hunter Samuel,L. Jackson,Jason Lee,Dominique Louis,;Brad Bird +92000000;Action,Adventure,Comedy,Crime,Thriller;Charlie's Angels;40.20395;2000-11-02;264105545;98.0;Cameron Diaz,Lucy Liu,Drew Barrymore,Bill Murray,John Forsythe,;McG +92000000;Action,Comedy;Tropic Thunder;43.192048;2008-08-09;188072649;107.0;Ben Stiller, Jack Black, Robert Downey Jr.,Nick Nolt,Steve Coogan;Ben Stiller +92000000;Action,Crime,Thriller;Spy Game;27.166757;2001-11-18;143049560;126.0;Robert Redford,Brad Pitt,Catherine McCormack,Stephen Dillane,Larry Bryggman,;Tony Scott +90000000;Comedy,Romance;Town & Country;1.004579;2001-04-27;10372291;104.0;Warren Beatty,Diane Keaton,Goldie Hawn,Garry Shandling,Andie MacDowell,;Peter Chelsom +90000000;Action,Crime,Thriller;Gone in Sixty Seconds;52.995628;2000-06-09;237202299;118.0;Nicolas Cage,Angelina Jolie,Giovanni Ribisi,Delroy Lindo,Will Patton,;Dominic Sena +90000000;Action,Adventure,Thriller;The Expendables 3;61.025639;2014-08-04;206172544;127.0;Sylvester Stallone,Jason Statham,Harrison Ford,Arnold Schwarzenegger,Mel Gibson,;Patrick Hughes +90000000;Action,Comedy,Science_Fiction;The Stepford Wives;19.224754;2004-06-10;102000000;93.0;Nicole Kidman,Matthew Broderick,Bette Midler,Glenn Close,Christopher Walken,;Frank Oz +90000000;Adventure,Fantasy,Action,Thriller,Science_Fiction;The Fifth Element;109.528572;1997-05-07;263920180;126.0;Bruce Willis,Gary Oldman,Ian Holm,Milla Jovovich,Chris Tucker,;Luc Besson +90000000;Adventure,Family,Fantasy;The Spiderwick Chronicles;21.436682;2008-02-14;162839667;95.0;Freddie Highmore,Mary-Louise Parker,Nick Nolte,Sarah Bolger,Andrew McCarthy,;Mark Waters +90000000;Action,Adventure, Comedy,Science_Fiction;Men in Black;104.121555;1997-07-02;589390539;98.0;Tommy Lee Jones,Will Smith,Linda Fiorentino,Vincent D'Onofrio,Rip Torn;Barry Sonnenfeld +90000000;Animation,Comedy,Family;Toy Story 2;73.575118;1999-10-30;497366869;92.0;Tom Hanks,Tim Allen,Joan Cusack,Kelsey Grammer,Don Rickles,;John Lasseter +90000000;Animation,Comedy,Family,Adventure;Ice Age: Dawn of the Dinosaurs;69.457898;2009-06-29;886686817;94.0;Ray Romano,John Leguizamo,Denis Leary,Queen Latifah,Simon Pegg,;Carlos Saldanha +90000000;Adventure,Comedy,Drama,Fantasy;The Secret Life of Walter Mitty;43.348022;2013-12-18;188133322;114.0;Ben Stiller,Kristen Wiig,Patton Oswalt,Shirley MacLaine,Adam Scott,;Ben Stiller +90000000;Drama,Thriller,Crime;The Departed;63.429157;2006-10-05;289847354;151.0;Leonardo DiCaprio,Matt Damon,Jack Nicholson,Mark Wahlberg,Martin Sheen,;Martin Scorsese +90000000;Animation,Family,Adventure;Mulan;67.427755;1998-06-18;304320254;88.0;Eddie Murphy,Jackie Chan,Ming-Na Wen,Lea Salonga,June Foray,;Tony Bancroft +90000000;Thriller,Crime,Mystery,Drama;The Girl with the Dragon Tattoo;47.651083;2011-12-14;232617430;158.0;Daniel Craig,Rooney Mara,Christopher Plummer,Goran Visnjic,Stellan Skarsgard,;David Fincher +90000000;Action,Adventure,Crime,Mystery;Sherlock Holmes;57.834787;2009-12-23;524028679;128.0;Robert Downey Jr.,Jude Law,Rachel McAdams,Mark Strong,Eddie Marsan;Guy Ritchie +90000000;Comedy,Action;You Don't Mess with the Zohan;40.597344;2008-06-05;201596308;113.0;Adam Sandler,John Turturro,Emmanuelle Chriqui,Nick Swardson,Lainie Kazan,;Dennis Dugan +90000000;Thriller,Fantasy,Comedy,Family,Mystery;The Haunted Mansion;16.302378;2003-11-25;182290266;99.0;Eddie Murphy,Terence Stamp,Nathaniel Parker,Marsha Thomason,Jennifer Tilly,;Rob Minkoff +90000000;Drama,Science_Fiction,Mystery;Contact;55.249433999999994;1997-07-11;171120329;150.0;Jodie Foster,Matthew McConaughey,James Woods,John Hurt,Tom Skerritt,;Robert Zemeckis +90000000;Action,Adventure,Comedy,Crime,Mystery;Now You See Me 2;51.535701;2016-06-02;334901337;129.0;Jesse Eisenberg,Woody Harrelson,Mark Ruffalo,Dave Franco,Morgan Freeman,;Jon M. Chu +90000000;Science_Fiction;Mission to Mars;16.058284;2000-03-10;60874615;114.0;Gary Sinise,Tim Robbins,Don Cheadle,Connie Nielsen,Jerry O'Connell,;Brian De Palma +90000000;Science_Fiction,Action,Drama,Thriller;Volcano;19.836123999999998;1997-04-25;0;104.0;Tommy Lee Jones,Anne Heche,Gaby Hoffmann,Don Cheadle,Joshua Fardon;Mick Jackson +90000000;Crime,Thriller,Drama;The Devil's Own;15.350451000000001;1997-03-12;140807547;107.0;Harrison Ford,Brad Pitt,Margaret Colin,Rubén Blades,Treat Williams,;Alan J. Pakula +90000000;Fantasy,Action,Family;The Nutcracker: The Untold Story;3.593349;2010-11-24;16178959;110.0;Elle Fanning,Nathan Lane,John Turturro,Frances de,la Tour,Charlie Rowe,;Andrei Konchalovsky +90000000;Adventure,Drama;Cast Away;57.739713;2000-12-22;429632142;143.0;Tom Hanks,Helen Hunt,Chris Noth,Paul Sanchez,Lari White,;Robert Zemeckis +90000000;Action,Drama,Thriller;Enemy of the State;41.207568;1998-11-20;250649836;132.0;Will Smith,Gene Hackman,Jon Voight,Regina King,Ian Hart,;Tony Scott +90000000;Action,Adventure,Family,Fantasy;Mighty Joe Young;6.643778;1998-12-25;0;114.0;Charlize Theron,Rade Serbedzija,Bill Paxton,Regina King,Peter Firth,;Ron Underwood +90000000;Adventure,Comedy,Drama,Family,Fantasy;Babe: Pig in the City;11.356079;1998-11-25;69131860;92.0;James Cromwell,Mary Stein,Mickey Rooney,Magda Szubanski,E.G. Daily,;George Miller +90000000;Drama,Thriller;The Insider;26.153669;1999-10-28;60289912;157.0;Al Pacino,Russell Crowe,Christopher Plummer,Diane Venora,Bruce McGill,;Michael Mann +90000000;Drama,Action,Thriller,Crime;Payback;17.457947;1999-02-05;161626121;100.0;Mel Gibson,Kris Kristofferson,Gregg Henry,Maria Bello,David Paymer,;Brian Helgeland +88000000;Action,Comedy,Science_Fiction;Pixels;140.849495;2015-07-16;243637091;105.0;Adam Sandler,Michelle Monaghan,Peter Dinklage,Josh Gad,Kevin James,;Chris Columbus +88000000;Romance,Drama,History;Cinderella Man;24.100863;2005-06-02;108539911;144.0;Russell Crowe,Renée Zellweger,Paul Giamatti,Craig Bierko,Paddy Considine,;Ron Howard +88000000;Adventure,Fantasy,Action,Comedy,Thriller;The Brothers Grimm;40.138009000000004;2005-08-26;105316267;118.0;Heath Ledger,Matt Damon,Mackenzie Crook,Roger Ashton-Griffiths,Peter Stormare,;Terry Gilliam +87000000;Drama,History;Seabiscuit;14.824166;2003-07-22;148336445;141.0;Jeff Bridges,David McCullough,Chris Cooper,Tobey Maguire,Elizabeth Banks,;Gary Ross +86000000;Adventure,Fantasy,Animation,Family;Arthur et les Minimoys;27.097932;2006-12-13;107944236;94.0;Freddie Highmore,Mia Farrow,Ron Crawford,Penny Balfour,Doug Rand,;Luc Besson +86000000;Thriller,Crime,Mystery;Awake;18.172735999999997;2007-11-28;14373825;84.0;Hayden Christensen,Jessica Alba,Terrence Howard,Lena Olin,Charlie Hewson,;Joby Harold +85000000;Animation,Comedy,Family;Surf's Up;23.230851;2007-06-08;149044513;85.0;Shia LaBeouf,Jeff Bridges,Zooey Deschanel,Jon Heder,James Woods,;Ash Brannon +85000000;Thriller,Crime;Ocean's Eleven;60.929352;2001-12-07;450717150;116.0;George Clooney,Brad Pitt,Matt Damon,Andy Garcia,Julia Roberts,;Steven Soderbergh +85000000;Animation,Comedy,Family,Fantasy;Hotel Transylvania;56.257411;2012-09-20;358375603;91.0;Adam Sandler,Steve Buscemi,David Spade,Kevin James,Selena Gomez,;Genndy Tartakovsky +85000000;Comedy,Family,Fantasy,Romance;Enchanted;29.21998;2007-11-20;340487652;107.0;Amy Adams,Patrick Dempsey,James Marsden,Timothy Spall,Rachel Covey,;Kevin Lima +85000000;Action,Thriller;Safe House;34.773106;2012-02-09;208076205;115.0;Denzel Washington,Ryan Reynolds,Vera Farmiga,Joel Kinnaman,Brendan Gleeson,;Daniel Espinosa +85000000;Comedy,Family;102 Dalmatians;9.895061;2000-10-07;183611771;100.0;Glenn Close,Ioan Gruffudd,Alice Evans,Tim McInnerny,Gérard Depardieu,;Kevin Lima +85000000;Comedy,Romance;The Holiday;44.967453000000006;2006-12-08;194168700;136.0;Cameron Diaz,Kate Winslet,Jude Law,Jack Black,Eli Wallach,;Nancy Meyers +85000000;Comedy,Romance;It's Complicated;16.479851;2009-12-23;219103655;121.0;Meryl Streep,Alec Baldwin,Steve Martin,John Krasinski,Lake Bell,;Nancy Meyers +85000000;Crime,Thriller;Ocean's Thirteen;42.069993;2007-06-07;311312624;122.0;George Clooney,Brad Pitt,Matt Damon,Al Pacino,Bernie Mac,;Steven Soderbergh +85000000;Adventure,Animation,Family;Open Season;26.61951;2006-09-29;197309027;83.0;Martin Lawrence,Ashton Kutcher,Gary Sinise,Debra Messing,Billy Connolly,;Jill Culton +85000000;Adventure,Action,Science_Fiction;Divergent;80.316463;2014-03-14;288747895;139.0;Shailene Woodley,Theo James,Kate Winslet,Miles Teller,Ray Stevenson,;Neil Burger +85000000;Adventure,Action,Comedy,Thriller;The Rundown;24.107835;2003-09-26;80916492;104.0;Dwayne Johnson,Seann William,Scott Rosario,Dawson Christopher,Walken Ernie,Reyes, Jr.,;Peter Berg +85000000;Drama,History,Romance;Memoirs of a Geisha;16.595874;2005-12-06;162242962;145.0;Zhang Ziyi,Gong Li,Youki Kudoh,Tsai Chin,Suzuka Ohgo,;Rob Marshall +85000000;Action,Crime,Drama,Thriller;The Fast and the Furious: Tokyo Drift;8.282876;2006-06-03;158468292;104.0;Lucas Black,Nathalie Kelley,Sung Kang,Shad Moss,Brian Tee,;Justin Lin +85000000;Action,Thriller,Drama;Collateral Damage;18.827753;2002-02-06;78382433;108.0;Arnold Schwarzenegger,Francesca Neri,Elias Koteas,Cliff Curtis,John Turturro,;Andrew Davis +85000000;Adventure,Fantasy,Drama,Comedy,Science_Fiction;Mirror Mirror;48.126296999999994;2012-03-15;183018522;106.0;Julia Roberts,Lily Collins,Armie Hammer,Nathan Lane,Martin Klebba,;Tarsem Singh +85000000;Comedy,Family;Cats & Dogs 2 : The Revenge of Kitty Galore;11.77398;2010-07-30;112483764;82.0;James Marsden,Nick Nolte,Christina Applegate,Bette Midler,Pascale Hutton,;Brad Peyton +85000000;Adventure,Fantasy,Science_Fiction;Hellboy II: The Golden Army;58.57976;2008-07-11;160388063;120.0;Ron Perlman,Selma Blair,Jeffrey Tambor,Doug Jones,John Hurt,;Guillermo del Toro +84000000;Fantasy,Comedy,Family,Adventure;Son of the Mask;17.815595000000005;2005-02-18;0;94.0;Jamie Kennedy,Alan Cumming,Traylor Howard,Kal Penn,Steven Wright,;Lawrence Guterman +84000000;Fantasy,Comedy,Romance,Science_Fiction;Nutty Professor II: The Klumps;17.783361;2000-07-27;123307945;106.0;Eddie Murphy,Janet Jackson,Larry Miller,John Ales,Richard Gant,;Peter Segal +84000000;Mystery,Adventure,Comedy;Scooby-Doo;31.435539000000002;2002-06-14;275650703;88.0;Freddie Prinze,Jr. Sarah,Michelle Gellar,Matthew Lillard,Linda Cardellini,Rowan Atkinson,;Raja Gosnell +84000000;Action,Comedy,Crime,Thriller;RED 2;44.34333;2013-07-18;0;116.0;Bruce Willis,Catherine Zeta-Jones,Anthony Hopkins,Helen Mirren,John Malkovich,;Dean Parisot +83000000;Science_Fiction,Comedy,Family,Romance;The Flintstones in Viva Rock Vegas;6.248309;2000-04-28;59468275;90.0;Mark Addy,Stephen Baldwin,Kristen Johnston,Jane Krakowski,Joan Collins,;Brian Levant +82500000;Comedy,Drama,Fantasy,Romance;Click;41.176631;2006-06-22;237681299;107.0;Adam Sandler,Kate Beckinsale,Christopher Walken,David Hasselhoff,Henry Winkler,;Frank Coraci +82000000;Science_Fiction;The 6th Day;18.447479;2000-11-17;96085477;123.0;Arnold Schwarzenegger,Michael Rapaport,Tony Goldwyn,Michael Rooker,Sarah Wynter,;Roger Spottiswoode +82000000;Action,Fantasy,Thriller;Sucker Punch;39.127082;2011-03-24;89792502;110.0;Emily Browning,Abbie Cornish,Jena Malone,Vanessa Hudgens,Jamie Chung,;Zack Snyder +82000000;Comedy,Drama,Romance;Man on the Moon;24.444186;1999-12-22;47434430;118.0;Jim Carrey,Courtney Love,Bob Zmuda,Danny DeVito,Gerry Becker,;Milo\u0161 Forman +80000000;History,Crime,Drama;Public Enemies;33.691694;2009-07-01;214104620;140.0;Christian Bale,Johnny Depp,Giovanni Ribisi,Billy Crudup,Marion Cotillard,;Michael Mann +80000000;Animation,Adventure,Family,Fantasy;Legend of the Guardians: The Owls of Ga'Hoole;37.321847999999996;2010-07-10;140073390;97.0;Emily Barclay,Abbie Cornish,Essie Davis,Joel Edgerton,Deborra-Lee Furness,;Zack Snyder +80000000;Crime,Thriller;The Interpreter;18.69984;2005-04-08;162944923;128.0;Nicole Kidman,Sean Penn,Catherine Keener,Jesper Christensen,Yvan Attal,;Sydney Pollack +80000000;Fantasy,Comedy;Bruce Almighty;109.68478799999998;2003-05-23;484572835;101.0;Jim Carrey,Jennifer Aniston,Philip Baker,Hall Catherine,Bell Lisa,Ann Walter,;Tom Shadyac +80000000;Thriller,Adventure,Action;The Expendables;77.58066099999998;2010-08-03;274470394;103.0;Sylvester Stallone,Jason Statham,Dolph Lundgren,Eric Roberts,Randy Couture,;Sylvester Stallone +80000000;Adventure,Action,Thriller;Mission: Impossible;75.290998;1996-05-22;457696359;110.0;Tom Cruise,Jon Voight,Emmanuelle Béart,Henry Czerny,Jean Reno,;Brian De Palma +80000000;Comedy;The Hangover Part II;58.040149;2011-05-25;254455986;102.0;Bradley Cooper,Ed Helms,Zach Galifianakis,Justin Bartha,Ken Jeong,;Todd Phillips +80000000;Action,Fantasy;Batman Returns;59.113174;1992-06-19;280000000;126.0;Michael Keaton,Danny DeVito,Michelle Pfeiffer,Christopher Walken,Michael Gough,;Tim Burton +80000000;Comedy,Animation,Family;Over the Hedge;36.32705;2006-04-22;343397247;83.0;Bruce Willis,Garry Shandling,Steve Carell,Wanda Sykes,William Shatner,;Karey Kirkpatrick +80000000;Comedy;Grown Ups 2;45.589568;2013-07-11;246984278;100.0;Adam Sandler,Kevin James,Chris Rock,David Spade,Salma Hayek,;Dennis Dugan +80000000;Action,Comedy,Thriller;Get Smart;23.496054;2008-06-19;230685453;110.0;Steve Carell,Anne Hathaway,Dwayne Johnson,Alan Arkin,Terence Stamp,;Peter Segal +80000000;Drama,Comedy,Romance;Something's Gotta Give;16.939441;2003-12-12;266728738;128.0;Jack Nicholson,Diane Keaton,Keanu Reeves,Frances McDormand,Amanda Peet,;Nancy Meyers +80000000;Drama,Thriller,Mystery;Shutter Island;81.91469599999998;2010-02-18;294804195;138.0;Leonardo DiCaprio,Mark Ruffalo,Ben Kingsley,Emily Mortimer,Michelle Williams,;Martin Scorsese +80000000;Comedy,Romance,Drama;Four Christmases;19.500892999999998;2008-11-26;163733697;88.0;Vince Vaughn,Reese Witherspoon,Robert Duvall,Sissy Spacek,Jon Voight,;Seth Gordon +80000000;Action,Crime,Science_Fiction,Thriller;Face/Off;46.075037;1997-06-27;245676146;138.0;John Travolta,Nicolas Cage,Joan Allen,Alessandro Nivola,Gina Gershon,;John Woo +80000000;Fantasy,Comedy,Family,Romance;Bedtime Stories;23.531720999999997;2008-12-24;212874442;99.0;Adam Sandler,Keri Russell,Guy Pearce,Courteney Cox,Lucy Lawless,;Adam Shankman +80000000;Romance,Comedy;Just Go with It;37.02665;2011-02-10;214918407;117.0;Adam Sandler,Jennifer Aniston,Nicole Kidman,Nick Swardson,Brooklyn Decker,;Dennis Dugan +80000000;Mystery,Thriller,Action;Eagle Eye;46.887983;2008-09-25;178066569;118.0;Shia LaBeouf,Michelle Monaghan,Rosario Dawson,Michael Chiklis,Anthony Mackie,;D.J. Caruso +80000000;Action,Thriller,Science_Fiction;The Book of Eli;32.363538;2010-01-14;157107755;118.0;Denzel Washington,Gary Oldman,Mila Kunis,Ray Stevenson,Jennifer Beals,;Albert Hughes +80000000;Comedy,Family,Science_Fiction;Flubber;11.503960000000001;1997-11-26;177977226;93.0;Robin Williams,Marcia Gay,Harden Christopher,McDonald Raymond,J. Barry,Clancy Brown,;Les Mayfield +80000000;Horror,Thriller,Fantasy,Mystery;The Haunting;19.375768;1999-07-23;91188905;113.0;Liam Neeson,Catherine Zeta-Jones,Owen Wilson,Lili Taylor,Bruce Dern,;Jan de Bont +80000000;Drama,Science_Fiction,Thriller;The Day the Earth Stood Still;41.890722;2008-12-10;233093859;104.0;Keanu Reeves,Jennifer Connelly,Kathy Bates,Jaden Smith,John Cleese,;Scott Derrickson +80000000;Comedy,Family,Animation,Adventure;Yogi Bear;11.187696;2010-12-11;201584141;80.0;Dan Aykroyd,Justin Timberlake,Anna Faris,Tom Cavanagh,Christine Taylor,;Eric Brevig +80000000;Western,Animation,Adventure,Comedy,Family;Spirit: Stallion of the Cimarron;41.670544;2002-05-24;122563539;83.0;Matt Damon,James Cromwell,Daniel Studi,Chopper Bernet,Jeff LeBeau,;Kelly Asbury +80000000;Comedy,Romance,Family;Zookeeper;27.462640000000004;2011-07-06;169852759;102.0;Kevin James,Rosario Dawson,Sylvester Stallone,Nick Nolte,Jon Favreau,;Frank Coraci +80000000;Adventure,Family,Science_Fiction;Lost in Space;17.455023999999998;1998-04-03;136159423;130.0;Gary Oldman,William Hurt,Matt LeBlanc,Mimi Rogers,Heather Graham,;Stephen Hopkins +80000000;Drama,Thriller,Mystery;The Manchurian Candidate;21.394281;2004-07-30;96105964;129.0;Denzel Washington,Meryl Streep,Liev Schreiber,Jon Voight,Kimberly Elise,;Jonathan Demme +80000000;Animation,Comedy,Family;Hotel Transylvania 2;61.692197;2015-09-21;473226958;89.0;Adam Sandler,Andy Samberg,Selena Gomez,Kevin James,Steve Buscemi,;Genndy Tartakovsky +80000000;Science_Fiction,Adventure,Action;The Time Machine;25.978555;2002-03-04;123729176;96.0;Guy Pearce,Mark Addy,Phyllida Law,Sienna Guillory,Laura Kirk,;Simon Wells +80000000;Action,Science_Fiction,Thriller;Surrogates;36.664991;2009-09-24;122444772;89.0;Bruce Willis,Radha Mitchell,Rosamund Pike,James Cromwell,Ving Rhames,;Jonathan Mostow +80000000;Drama,Thriller;Thirteen Days;18.261210000000002;2000-12-24;34566746;145.0;Kevin Costner,Bruce Greenwood,Steven Culp,Dylan Baker,Shawn Driscoll,;Roger Donaldson +80000000;Animation,Family,Adventure;Walking With Dinosaurs;10.088006;2013-12-18;126546518;87.0;Charlie Rowe,Justin Long,Karl Urban,Angourie Rice,John Leguizamo,;Barry Cook +80000000;Animation,Comedy,Family;Looney Tunes: Back in Action;16.715631;2003-11-14;68514844;90.0;Brendan Fraser,Jenna Elfman,Steve Martin,Timothy Dalton,Heather Locklear,;Joe Dante +80000000;Drama,Music,Romance;Nine;9.357733999999999;2009-12-03;53825515;112.0;Judi Dench,Daniel Day-Lewis,Marion Cotillard,Penélope Cruz,Sophia Loren,;Rob Marshall +80000000;Action,Adventure,Science_Fiction;Timeline;11.22268;2003-11-26;19480739;116.0;Paul Walker,Frances O'Connor,Gerard Butler,Billy Connolly,David Thewlis,;Richard Donner +80000000;Drama,Adventure;The Postman;14.564667000000002;1997-12-25;17626234;177.0;Kevin Costner,Will Patton,Olivia Williams,Larenz Tate,Tom Petty,;Kevin Costner +80000000;Thriller,Action,Science_Fiction;Red Planet;13.800656;2000-11-10;33463969;106.0;Val Kilmer,Carrie-Anne Moss,Benjamin Bratt,Tom Sizemore,Simon Baker,;Antony Hoffman +80000000;Thriller,Science_Fiction,Adventure,Action;A Sound of Thunder;7.342892;2005-05-15;5989640;110.0;Heike Makatsch,Armin Rohde,David Oyelowo,Wilfried Hochholdinger,Edward Burns,;Peter Hyams +80000000;Science_Fiction,Thriller;The Invasion;15.673154;2007-08-17;15071514;99.0;Nicole Kidman,Daniel Craig,Jeremy Northam,Jeffrey Wright,Jackson Bond,;Oliver Hirschbiegel +80000000;Horror,Mystery,Thriller;Exorcist: The Beginning;15.761384;2004-08-20;78000586;114.0;Stellan Skarsgard,Izabella Scorupco,James D'Arcy,Julian Wadham,Remy Sweeney,;Renny Harlin +80000000;Comedy;Grown Ups;38.864027;2010-06-24;271430189;102.0;Adam Sandler,Salma Hayek,Maria Bello,Steve Buscemi,Maya Rudolph,;Dennis Dugan +80000000;Comedy;Spanglish;14.209329;2004-12-17;55041367;130.0;Adam Sandler,Téa Leoni,Paz Vega,Cloris Leachman,Shelbie Bruce,;James L. Brooks +80000000;Action,Thriller;Ransom;16.411345;1996-11-08;309492681;117.0;Mel Gibson,Gary Sinise,Delroy Lindo,Rene Russo,Lili Taylor,;Ron Howard +80000000;Action,Thriller,Crime;S.W.A.T.;34.052253;2003-08-08;116643346;117.0;Samuel L.,Jackson Colin,Farrell Michelle,Rodriguez LL,Cool J,Josh Charles,;Clark Johnson +80000000;Action,Drama,History,Thriller;The Finest Hours;28.22366400000001;2016-01-25;52099090;114.0;Chris Pine,Casey Affleck,Ben Foster,Eric Bana,Holliday Grainger,;Craig Gillespie +80000000;Crime,Drama,Mystery,Thriller;Edge of Darkness;24.657931;2010-01-29;74901339;117.0;Mel Gibson,Ray Winstone,Danny Huston,Shawn Roberts,Denis O'Hare,;Martin Campbell +80000000;Fantasy,Drama;The Legend of Bagger Vance;16.848899;2000-11-02;39459427;126.0;Matt Damon,Bruce McGill,Charlize Theron,Will Smith,Joel Gretsch,;Robert Redford +80000000;Comedy;Edtv;14.298297;1999-03-26;0;122.0;Matthew McConaughey,Woody Harrelson,Sally Kirkland,Jenna Elfman,Martin Landau,;Ron Howard +80000000;Action,History,War;The Great Raid;8.923214999999997;2005-08-12;10166502;132.0;Benjamin Bratt,James Franco,Connie Nielsen,Marton Csokas,Joseph Fiennes,;John Dahl +80000000;Romance,Drama;Message in a Bottle;10.81051;1999-02-22;118880016;131.0;Kevin Costner,Robin Wright,Paul Newman,John Savage,Illeana Douglas,;Luis Mandoki +79000000;Adventure,Fantasy,Action;The Lord of the Rings: The Two Towers;106.914973;2002-12-18;926287400;179.0;Elijah Wood,Ian McKellen,Viggo Mortensen,Liv Tyler,Orlando Bloom,;Peter Jackson +79000000;Drama;Cold Mountain;24.598479;2003-12-24;173013509;154.0;Jude Law,Nicole Kidman,Renée Zellweger,Eileen Atkins,Brendan Gleeson,;Anthony Minghella +79000000;Adventure,Action,Science_Fiction;Journey 2: The Mysterious Island;40.72345900000001;2012-01-19;355692760;94.0;Dwayne Johnson,Josh Hutcherson,Kristin Davis,Vanessa Hudgens,Luis Guzman,;Brad Peyton +79000000;Comedy;Jack and Jill;22.132417999999998;2011-11-11;149673788;91.0;Adam Sandler,Katie Holmes,Al Pacino,Eugenio Derbez,Tim Meadows,;Dennis Dugan +78000000;Animation,Family,Comedy;Cloudy with a Chance of Meatballs 2;41.247402;2013-09-26;248384621;95.0;Bill Hader,Anna Faris,James Caan,Will Forte,Andy Samberg,;Cody Cameron +78000000;Crime,Thriller,Horror;Red Dragon;10.083905;2002-09-29;209196298;124.0;Anthony Hopkins,Edward Norton,Ralph Fiennes,Harvey Keitel,Emily Watson,;Brett Ratner +78000000;Fantasy,Action,Thriller,Science_Fiction;The League of Extraordinary Gentlemen;47.436675;2003-07-11;179265204;110.0;Sean Connery,Peta Wilson,Shane West,Stuart Townsend,Jason Flemyng,;Stephen Norrington +76000000;Animation,Comedy,Family;Despicable Me 2;136.886704;2013-06-25;970761885;98.0;Steve Carell,Kristen Wiig,Benjamin Bratt,Miranda Cosgrove,Russell Brand,;Pierre Coffin +76000000;Drama,Action,Thriller,Science_Fiction;Children of Men;35.387874;2006-09-22;69959751;109.0;Clive Owen,Michael Caine,Julianne Moore,Charlie Hunnam,Chiwetel Ejiofor,;Alfonso Cuaru3n +75000000;Action,Drama,Thriller;The Bourne Supremacy;53.213931;2004-07-23;288500217;108.0;Matt Damon,Franka Potente,Brian Cox,Julia Stiles,Karl Urban,;Paul Greengrass +75000000;Adventure,Action,Thriller;The Three Musketeers;36.605246;2011-08-31;132274484;110.0;Milla Jovovich,Orlando Bloom,Logan Lerman,Ray Stevenson,Matthew Macfadyen,;Paul W.S. Anderson +75000000;Action,Comedy;Tower Heist;36.743324;2011-11-02;152930623;104.0;Ben Stiller,Eddie Murphy,Casey Affleck,Alan Alda,Matthew Broderick,;Brett Ratner +75000000;Science_Fiction,Adventure,Fantasy;The Hunger Games;68.550698;2012-03-12;691210692;142.0;Jennifer Lawrence,Josh Hutcherson,Liam Hemsworth,Woody Harrelson,Elizabeth Banks,;Gary Ross +75000000;Action,Drama,Romance;Deep Impact;34.070054;1998-05-08;140464664;120.0;Robert Duvall,Téa Leoni,Elijah Wood,Vanessa Redgrave,Morgan Freeman,;Mimi Leder +75000000;Comedy,Fantasy,Family,Music,Animation;Alvin and the Chipmunks: Chipwrecked;23.473004;2011-12-14;342695435;87.0;Jason Lee,David Cross,Jenny Slate,Andy Buckley,Justin Long,;Mike Mitchell +75000000;Animation,Comedy,Family,Science_Fiction;Robots;29.558157;2005-03-10;260696994;91.0;Robin Williams,Ewan McGregor,Halle Berry,Mel Brooks,Paula Abdul,;Chris Wedge +75000000;Action,Thriller,Crime;Con Air;45.154631;1997-06-01;224012234;115.0;Nicolas Cage,John Cusack,John Malkovich,Ving Rhames,Nick Chinlund,;Simon West +75000000;Action,Drama,Mystery,Thriller;Conspiracy Theory;22.179658;1997-08-07;136982834;135.0;Mel Gibson,Julia Roberts,Patrick Stewart,Cylk Cozart,Steve Kahan,;Richard Donner +75000000;Action,Adventure;The Legend of Zorro;31.054334000000004;2005-10-24;142400065;129.0;Antonio Banderas,Catherine Zeta-Jones,Adrian Alonso,Barona Julio,Oscar Mechoso,Nick Chinlund,;Martin Campbell +75000000;Animation,Family;The Secret Life of Pets;31.482871999999997;2016-06-18;875958308;87.0;Louis C.K.,Eric Stonestreet,Kevin Hart,Jenny Slate,Lake Bell,;Chris Renaud +75000000;Action,Adventure,Science_Fiction;Independence Day;60.442593;1996-06-25;816969268;145.0;Will Smith,Bill Pullman,Jeff Goldblum,Mary McDonnell,Judd Hirsch,;Roland Emmerich +75000000;Family,Animation;Madagascar;48.110909;2005-05-25;532680671;86.0;Ben Stiller,Chris Rock,David Schwimmer,Jada Pinkett,Smith Sacha,Baron Cohen,;Eric Darnell +75000000;Adventure,Action,Science_Fiction;X-Men;4.6689099999999994;2000-07-13;296339527;104.0;Patrick Stewart,Hugh Jackman,Ian McKellen,Halle Berry,Famke Janssen,;Bryan Singer +75000000;Action,Thriller,Crime;Wanted;73.82289;2008-06-19;258270008;110.0;Angelina Jolie,James McAvoy,Morgan Freeman,Thomas Kretschmann,Terence Stamp,;Timur Bekmambetov +75000000;Action,Adventure,Thriller;The Rock;51.469576;1996-06-06;335062621;136.0;Sean Connery,Nicolas Cage,Ed Harris,John Spencer,David Morse,;Michael Bay +75000000;Comedy,Romance;50 First Dates;61.437585999999996;2004-02-13;196482882;99.0;Adam Sandler,Drew Barrymore,Rob Schneider,Sean Astin,Lusia Strus,;Peter Segal +75000000;Action,Adventure,Comedy,Family;Inspector Gadget;17.561954999999998;1999-07-23;0;78.0;Matthew Broderick,Rupert Everett,Joely Fisher,Michelle Trachtenberg,Andy Dick,;David Kellogg +75000000;Thriller,Crime;Now You See Me;71.124686;2013-05-29;117698894;115.0;Jesse Eisenberg,Mark Ruffalo,Woody Harrelson,Mélanie Laurent,Isla Fisher,;Louis Leterrier +75000000;Action,Adventure,Thriller;Vertical Limit;13.318744;2000-12-08;215663859;124.0;Chris O'Donnell,Robin Tunney,Bill Paxton,Scott Glenn,Izabella Scorupco,;Martin Campbell +75000000;Action,Comedy,Thriller,Romance;Killers;23.004607;2010-06-04;98159963;100.0;Katherine Heigl,Ashton Kutcher,Tom Selleck,Catherine O'Hara,Alex Borstein,;Robert Luketic +75000000;Comedy,Action,Adventure;The Man from U.N.C.L.E.;48.74420900000001;2015-08-13;108145109;116.0;Henry Cavill,Armie Hammer,Alicia Vikander,Elizabeth Debicki,Luca Calvani,;Guy Ritchie +75000000;Animation,Comedy,Family,Fantasy;Monster House;36.368839;2006-07-21;140175006;91.0;Ryan Newman,Steve Buscemi,Mitchel Musso,Sam Lerner,Spencer Locke,;Gil Kenan +75000000;Fantasy,Action,Drama;Immortals;37.917002000000004;2011-11-10;226904017;110.0;Mickey Rourke,Kellan Lutz,Isabel Lucas,Henry Cavill,Luke Evans,;Tarsem Singh +75000000;Animation,Action,Science_Fiction,Family,Adventure;Titan A.E.;14.443810000000001;2000-06-16;36754634;94.0;Matt Damon,Bill Pullman,Drew Barrymore,John Leguizamo,Nathan Lane,;Gary Goldman +75000000;Action,Adventure,Comedy,Thriller;Hollywood Homicide;10.605084;2003-06-09;51142659;116.0;Harrison Ford,Josh Hartnett,Lena Olin,Bruce Greenwood,Isaiah Washington,;Ron Shelton +75000000;Adventure,Fantasy,Animation,Action,Comedy;Monkeybone;8.098369;2001-02-23;5409517;93.0;Brendan Fraser,Bridget Fonda,John Turturro,Chris Kattan,Giancarlo Esposito,;Henry Selick +75000000;Comedy,Drama;Funny People;20.199057;2009-07-31;61458982;146.0;Adam Sandler,Seth Rogen,Leslie Mann,Eric Bana,Jonah Hill,;Judd Apatow +75000000;Animation,Comedy,Family;The Simpsons Movie;46.875375;2007-07-25;527068851;87.0;Dan Castellaneta,Julie Kavner,Nancy Cartwright,Yeardley Smith,Hank Azaria,;David Silverman +75000000;Drama,Thriller,Fantasy,Mystery;Lady in the Water;20.219385;2006-07-21;42285169;110.0;Paul Giamatti,Jeffrey Wright,Bob Balaban,Sarita Choudhury,Cindy Cheung,;M. Night Shyamalan +75000000;Action,History,War;We Were Soldiers;19.708731;2002-03-01;114660784;138.0;Mel Gibson,Greg Kinnear,Madeleine Stowe,Sam Elliott,Chris Klein,;Randall Wallace +75000000;Comedy,Drama,Music,Romance;Rock of Ages;23.515938000000002;2012-06-13;59418613;123.0;Julianne Hough,Diego Boneta,Tom Cruise,Alec Baldwin,Russell Brand,;Adam Shankman +75000000;Mystery,Thriller,Crime;Domestic Disturbance;8.418560000000001;2001-10-30;54249294;89.0;John Travolta,Vince Vaughn,Teri Polo,Matt O'Leary,Steve Buscemi,;Harold Becker +75000000;Action,Adventure,Comedy;Three Kings;34.973086;1999-09-27;108000000;114.0;George Clooney,Mark Wahlberg,Ice Cube,Spike Jonze,Cliff Curtis,;David O. Russell +75000000;Comedy;The Out-of-Towners;4.842626;1999-04-02;29000000;90.0;Steve Martin,Goldie Hawn,John Cleese,Mark McKinney,Jessica Cauffiel,;Sam Weisman +75000000;Drama,Science_Fiction,Thriller;The Astronaut's Wife;20.697556;1999-08-26;19598588;109.0;Johnny Depp,Charlize Theron,Joe Morton,Clea DuVall,Nick Cassavetes,;Rand Ravich +74000000;Family,Animation,Adventure,Comedy;Minions;875.581305;2015-06-17;1156730962;91.0;Sandra Bullock,Jon Hamm,Michael Keaton,Allison Janney,Steve Coogan,;Kyle Balda +74000000;Animation,Adventure,Comedy,Family;The SpongeBob Movie: Sponge Out of Water;36.952268;2015-02-05;311594032;93.0;Tom Kenny,Bill Fagerbakke,Rodger Bumpass,Clancy Brown,Carolyn Lawrence,;Paul Tibbitt +73000000;Adventure,Action,Science_Fiction;The Lost World: Jurassic Park;2.502487;1997-05-23;229074524;129.0;Jeff Goldblum,Julianne Moore,Pete Postlethwaite,Richard Attenborough,Vince Vaughn,;Steven Spielberg +73000000;Crime,Mystery;Snake Eyes;20.790703;1998-08-07;103891409;98.0;Nicolas Cage,Gary Sinise,John Heard,Carla Gugino,Tamara Tunie,;Brian De Palma +73000000;Family,Animation;The Angry Birds Movie;45.720894;2016-05-11;349779543;97.0;Jason Sudeikis,Josh Gad,Danny McBride,Maya Rudolph,Bill Hader,;Fergal Reilly +73000000;Drama,Mystery,Thriller,Crime;The Bone Collector;33.884459;1999-11-04;151493655;118.0;Denzel Washington,Angelina Jolie,Queen Latifah,Michael Rooker,Michael McGlone,;Phillip Noyce +72000000;Action,Drama,History,War;Braveheart;60.722162;1995-05-24;210000000;177.0;Mel Gibson,Catherine McCormack,Sophie Marceau,Patrick McGoohan,Angus Macfadyen,;Mel Gibson +72000000;Drama,War;Jarhead;32.227222999999995;2005-11-04;96889998;125.0;Jamie Foxx,Jake Gyllenhaal,Scott MacDonald,Lucas Black,Peter Sarsgaard,;Sam Mendes +72000000;Drama,Thriller,Science_Fiction,Mystery;Signs;28.848187;2002-08-02;408247917;106.0;Mel Gibson,Joaquin Phoenix,Rory Culkin,Abigail Breslin,Cherry Jones,;M. Night Shyamalan +72000000;Action,Drama,Thriller;The Last Castle;15.433244;2001-10-19;27642707;131.0;Robert Redford,James Gandolfini,Mark Ruffalo,Steve Burton,Delroy Lindo,;Rod Lurie +71000000;Comedy,Family,Fantasy;Doctor Dolittle;21.462935;1998-06-22;294456605;85.0;Eddie Murphy,Ossie Davis,Oliver Platt,Peter Boyle,Richard Schiff,;Betty Thomas +70000000;Adventure,Action,Animation;Beowulf;35.60166500000001;2007-11-05;195735876;115.0;Ray Winstone,Angelina Jolie,Anthony Hopkins,Robin Wright,John Malkovich,;Robert Zemeckis +70000000;Action,Drama,Mystery,Thriller;The Bourne Ultimatum;45.381501;2007-08-03;442824138;115.0;Matt Damon,Julia Stiles,David Strathairn,Scott Glenn,Paddy Considine,;Paul Greengrass +70000000;Action,Adventure,Comedy,Romance;Six Days Seven Nights;18.264635000000002;1998-06-12;164000000;98.0;Harrison Ford,Anne Heche,David Schwimmer,Jacqueline Obradors,Temuera Morrison,;Ivan Reitman +70000000;Comedy,Fantasy,Science_Fiction;Mars Attacks!;44.090534999999996;1996-12-12;101371017;106.0;Jack Nicholson,Glenn Close,Annette Bening,Pierce Brosnan,Danny DeVito,;Tim Burton +70000000;Drama;Dreamgirls;14.486310999999999;2006-12-25;154937680;134.0;Jamie Foxx,Beyoncé Knowles,Eddie Murphy,Danny Glover,Jennifer Hudson,;Bill Condon +70000000;Drama,Action,History,Thriller;Munich;29.035221999999997;2005-12-22;130358911;164.0;Eric Bana,Daniel Craig,Ciaran Hinds,Mathieu Kassovitz,Hanns Zischler,;Steven Spielberg +70000000;Action,Drama,War;Tears of the Sun;27.055085;2003-03-07;85632458;121.0;Bruce Willis,Monica Bellucci,Cole Hauser,Eamonn Walker,Johnny Messner,;Antoine Fuqua +70000000;Romance,Comedy,Adventure;Fool's Gold;21.789614999999998;2008-02-07;111231041;112.0;Matthew McConaughey,Kate Hudson,Donald Sutherland,Ewen Bremner,Alexis Dziena,;Andy Tennant +70000000;Thriller,Action,Drama;The Kingdom;26.123704999999998;2007-08-22;86658558;110.0;Jamie Foxx,Jennifer Garner,Chris Cooper,Jason Bateman,Ali Suliman,;Peter Berg +70000000;Comedy,Romance;Runaway Bride;20.230535;1999-07-30;309457509;116.0;Julia Roberts,Richard Gere,Joan Cusack,Rita Wilson,Héctor Elizondo,;Garry Marshall +70000000;Drama,Action,Thriller,War;Inglourious Basterds;72.595961;2009-08-18;319131050;153.0;Brad Pitt,Mélanie Laurent,Christoph Waltz,Eli Roth,Michael Fassbender,;Quentin Tarantino +70000000;Adventure,Fantasy,Comedy,Family;Hook;33.648404;1991-12-11;300854823;144.0;Robin Williams,Dustin Hoffman,Julia Roberts,Bob Hoskins,Maggie Smith,;Steven Spielberg +70000000;Action,Thriller;Die Hard 2;57.69846999999999;1990-07-02;240031094;124.0;Bruce Willis,Bonnie Bedelia,William Atherton,Reginald VelJohnson,Franco Nero,;Renny Harlin +70000000;Adventure,Science_Fiction,Action;AVP: Alien vs. Predator;42.957215999999995;2004-08-12;171183863;101.0;Sanaa Lathan,Raoul Bova,Ewen Bremner,Colin Salmon,Tommy Flanagan,;Paul W.S. Anderson +70000000;Action,Thriller;Olympus Has Fallen;59.428222999999996;2013-03-20;161025640;120.0;Gerard Butler,Aaron Eckhart,Angela Bassett,Morgan Freeman,Radha Mitchell,;Antoine Fuqua +70000000;Science_Fiction,Action,Adventure,Thriller;Star Trek: Insurrection;19.711951000000006;1998-12-10;118000000;103.0;Patrick Stewart,Jonathan Frakes,Brent Spiner,LeVar Burton,Michael Dorn,;Jonathan Frakes +70000000;Action,Science_Fiction;Battle: Los Angeles;49.199234000000004;2011-03-08;202466756;116.0;Aaron Eckhart,Ramu3n Rodriguez,Will Rothhaar,Cory Hardrict,Jim Parrack,;Jonathan Liebesman +70000000;War,Drama,History,Action;The Monuments Men;43.873266;2014-01-24;154984035;118.0;Matt Damon,Cate Blanchett,George Clooney,Bill Murray,John Goodman,;George Clooney +70000000;Drama,Crime;Wall Street: Money Never Sleeps;23.25645;2010-09-02;134748021;133.0;Michael Douglas,Shia LaBeouf,Josh Brolin,Carey Mulligan,Frank Langella,;Oliver Stone +70000000;Horror,Action,Drama,Fantasy,War;Dracula Untold;64.45794699999999;2014-10-01;215529201;92.0;Luke Evans,Sarah Gadon,Dominic Cooper,Art Parkinson,Charles Dance,;Gary Shore +70000000;Drama,Action,Thriller,Crime;The Siege;20.089933;1998-11-06;116672912;116.0;Denzel Washington,Annette Bening,Bruce Willis,Tony Shalhoub,Sami Bouajila,;Edward Zwick +70000000;Adventure,Drama,History;Seven Years in Tibet;16.92991;1997-09-12;131457682;136.0;Brad Pitt,Jamyang Jamtsho,Wangchuk David,Thewlis BD,Wong Mako,;Jean-Jacques Annaud +70000000;Comedy,Drama;The Dilemma;14.780634;2011-01-13;67112664;111.0;Kevin James,Vince Vaughn,Winona Ryder,Jennifer Connelly,Queen Latifah,;Ron Howard +70000000;Action,Adventure,Comedy,Thriller;Bad Company;14.086292000000002;2002-06-07;65977295;116.0;Anthony Hopkins,Chris Rock,Peter Stormare,Gabriel Macht,Kerry Washington,;Joel Schumacher +70000000;Action,Adventure,Comedy,Thriller;I Spy;13.267631;2002-10-31;33561137;97.0;Eddie Murphy,Owen Wilson,Famke Janssen,Keith Dallas,Malcolm McDowell,;Betty Thomas +70000000;Fantasy,Action,Horror;Underworld: Awakening;58.40120400000001;2012-01-19;160112671;88.0;Kate Beckinsale,Stephen Rea,Michael Ealy,Theo James,India Eisley,;Mans Marlind +70000000;Drama,War;Hart's War;14.244518;2002-02-15;32287044;125.0;Bruce Willis,Colin Farrell,Terrence Howard,Marcel Iure\u0219,Cole Hauser,;Gregory Hoblit +70000000;Action,Adventure,Thriller;Ballistic: Ecks vs. Sever;8.37378;2002-09-20;19924033;91.0;Antonio Banderas,Lucy Liu,Gregg Henry,Ray Park,Talisa Soto,;Wych Kaosayananda +70000000;Thriller;Hard Rain;10.930537;1998-01-16;19870567;97.0;Morgan Freeman,Christian Slater,Randy Quaid,Minnie Driver,Ed Asner,;Mikael Salomon +70000000;Animation,Music,Family;Legends of Oz: Dorothy's Return;6.6820059999999994;2013-06-13;18662027;88.0;Lea Michele,Dan Aykroyd,Patrick Stewart,Hugh Dancy,Jim Belushi,;Dan St. Pierre +70000000;Crime,Drama,Mystery;Blackhat;46.832372;2015-01-13;17752940;133.0;Chris Hemsworth,Leehom Wang,Tang Wei,Viola Davis,Holt McCallany,;Michael Mann +70000000;Mystery,Action,Thriller,Science_Fiction,Adventure;Sky Captain and the World of Tomorrow;24.664776;2004-09-17;57958696;107.0;Jude Law,Gwyneth Paltrow,Giovanni Ribisi,Angelina Jolie,Bai Ling,;Kerry Conran +70000000;Crime,Mystery,Thriller;Basic Instinct 2;13.483386999999999;2006-03-29;38629478;114.0;Sharon Stone,David Morrissey,Charlotte Rampling,David Thewlis,Stan Collymore,;Michael Caton-Jones +70000000;Action,Adventure;The Legend of Hercules;25.020428;2014-01-10;61279452;99.0;Kellan Lutz,Liam McIntyre,Gaia Weiss,Scott Adkins,Roxanne McKee,;Renny Harlin +70000000;Adventure,Drama,History;Agora;18.888806;2009-05-17;39041505;127.0;Rachel Weisz,Max Minghella,Oscar Isaac,Ashraf Barhom,Michael Lonsdale,;Alejandro Amenabar +70000000;Action,Drama,Thriller;Body of Lies;37.507135999999996;2008-10-10;113280098;128.0;Leonardo DiCaprio,Russell Crowe,Mark Strong,Ali Suliman,Simon McBurney,;Ridley Scott +70000000;Drama,History,War;Saving Private Ryan;76.04186700000002;1998-07-24;481840909;169.0;Tom Hanks,Matt Damon,Vin Diesel,Tom Sizemore,Barry Pepper,;Steven Spielberg +70000000;Comedy,Romance;What Women Want;31.39165;2000-12-15;374111707;127.0;Helen Hunt,Mel Gibson,Marisa Tomei,Lauren Holly,Mark Feuerstein,;Nancy Meyers +70000000;Action,Adventure,Thriller;Cliffhanger;26.199089999999998;1993-05-28;255000211;112.0;Sylvester Stallone,John Lithgow,Michael Rooker,Janine Turner,Rex Linn,;Renny Harlin +70000000;Adventure,Animation,Drama,Family,Music;The Prince of Egypt;29.464852;1998-12-15;218613188;99.0;Val Kilmer,Ralph Fiennes,Patrick Stewart,Michelle Pfeiffer,Sandra Bullock,;Simon Wells +70000000;Comedy,Romance;Couples Retreat;26.676486999999998;2009-09-19;171844840;113.0;Vince Vaughn,Malin Akerman,Jason Bateman,Kristen Bell,Jon Favreau,;Peter Billingsley +70000000;Action,Drama,Thriller,Crime;Man on Fire;45.299089;2004-04-23;130293714;146.0;Denzel Washington,Dakota Fanning,Marc Anthony,Radha Mitchell,Christopher Walken,;Tony Scott +70000000;Science_Fiction,Horror,Action;Alien: Resurrection;37.44963;1997-11-12;162000000;109.0;Sigourney Weaver,Winona Ryder,Brad Dourif,Ron Perlman,Michael Wincott,;Jean-Pierre Jeunet +70000000;Thriller,Drama,Romance;The Phantom of the Opera;18.927463;2004-12-08;154648887;143.0;Gerard Butler,Emmy Rossum,Patrick Wilson,Miranda Richardson,Minnie Driver,;Joel Schumacher +70000000;Comedy;Yes Man;43.849351;2008-12-09;225990978;104.0;Jim Carrey,Zooey Deschanel,Rhys Darby,Sasha Alexander,Fionnula Flanagan,;Peyton Reed +70000000;Action,Adventure,Science_Fiction,Thriller;Babylon A.D.;27.568194000000002;2008-08-20;72108608;101.0;Vin Diesel,Michelle Yeoh,Mélanie Thierry,Lambert Wilson,Charlotte Rampling,;Mathieu Kassovitz +70000000;Crime,Drama,Mystery,Thriller;Double Jeopardy;19.439386;1999-09-24;177841558;105.0;Tommy Lee Jones,Ashley Judd,Bruce Greenwood,Annabeth Gish,Benjamin Weir;Bruce Beresford +70000000;Action,Comedy,Thriller;Chill Factor;3.2769120000000003;1999-09-01;11263966;101.0;Cuba Gooding,Jr. Skeet,Ulrich Peter,Firth David,Paymer Daniel,Hugh Kelly,;Hugh Johnson +70000000;Fantasy,Drama,Horror,Action,Thriller;디워;4.822033;2007-02-08;53587404;90.0;Jason Behr,Robert Forster,Aimee Garcia,Chris Mulkey,Elizabeth Peu1a,;Shim Hyung-Rae +69000000;Animation,Family;Despicable Me;113.858273;2010-07-08;543513985;95.0;Steve Carell,Jason Segel,Russell Brand,Julie Andrews,Will Arnett,;Pierre Coffin +69000000;Comedy;Dinner for Schmucks;11.023691;2010-07-30;86387857;114.0;Steve Carell,Paul Rudd,Stephanie Szostak,Jemaine Clement,Zach Galifianakis,;Jay Roach +68000000;Thriller,Action,Romance,Science_Fiction,Adventure;The Saint;20.913852;1997-04-03;118063304;116.0;Val Kilmer,Elisabeth Shue,Rade Serbedzija,Henry Goodman,Alun Armstrong,;Phillip Noyce +68000000;War;Enemy at the Gates;41.273567;2001-03-13;96976270;131.0;Jude Law,Rachel Weisz,Ed Harris,Joseph Fiennes,Bob Hoskins,;Jean-Jacques Annaud \ No newline at end of file diff --git a/src/test/kotlin/exercise5/TestGameBoard.kt b/src/test/kotlin/exercise5/TestGameBoard.kt new file mode 100644 index 0000000..313f3a8 --- /dev/null +++ b/src/test/kotlin/exercise5/TestGameBoard.kt @@ -0,0 +1,90 @@ +package exercise5 + +import org.junit.Assert +import org.junit.FixMethodOrder +import org.junit.jupiter.api.Test +import org.junit.runners.MethodSorters + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +class TestGameBoard { + operator fun GameBoard.get(i: Int, j: Int) = get(getCell(i, j)) + operator fun GameBoard.set(i: Int, j: Int, value: String?) = set(getCell(i, j), value) + + @Test + fun test01GetAndSetElement() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + Assert.assertEquals("a", gameBoard[1, 1]) + } + + @Test + fun test02Filter() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + gameBoard[1, 2] = "b" + val cells = gameBoard.filter { it == "a" } + Assert.assertEquals(1, cells.size) + val cell = cells.first() + Assert.assertEquals(1, cell.i) + Assert.assertEquals(1, cell.j) + } + + @Test + fun test03All() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + gameBoard[1, 2] = "a" + Assert.assertFalse(gameBoard.all { it == "a" }) + gameBoard[2, 1] = "a" + gameBoard[2, 2] = "a" + Assert.assertTrue(gameBoard.all { it == "a" }) + } + + @Test + fun test04Any() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + gameBoard[1, 2] = "b" + Assert.assertTrue(gameBoard.any { it?.toCharArray()?.firstOrNull() in 'a'..'b' }) + Assert.assertTrue(gameBoard.any { it == null }) + } + + @Test + fun test05TheSameCell() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + val cell1 = gameBoard.find { it == "a" } + gameBoard[1, 1] = "b" + val cell2 = gameBoard.find { it == "b" } + Assert.assertEquals(cell1, cell2) + } + + @Test + fun test06FindReturnsTheSameCell() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + val first = gameBoard.find { it == "a" } + val second = gameBoard.getCell(1, 1) + Assert.assertTrue( + "find shouldn't recreate the 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells\n" + + "should return existing cells instead of creating new ones.", + first === second + ) + } + + @Test + fun test07FilterTheSameCell() { + val gameBoard = createGameBoard(2) + gameBoard[1, 1] = "a" + val cells = gameBoard.filter { it == "a" } + val first = cells.first() + val second = gameBoard.getCell(1, 1) + Assert.assertTrue( + "'filter' shouldn't recreate the 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells\n" + + "should return existing cells instead of creating new ones.", + first === second + ) + } +} \ No newline at end of file diff --git a/src/test/kotlin/exercise5/TestSquareBoard.kt b/src/test/kotlin/exercise5/TestSquareBoard.kt new file mode 100644 index 0000000..8c9de2c --- /dev/null +++ b/src/test/kotlin/exercise5/TestSquareBoard.kt @@ -0,0 +1,209 @@ +package exercise5 + +import org.junit.Assert +import org.junit.FixMethodOrder +import org.junit.jupiter.api.Test +import org.junit.runners.MethodSorters + +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +class TestSquareBoard { + @Test + fun test00AllCells() { + val board = createSquareBoard(2) + val cells = board.getAllCells().sortedWith(compareBy { it.i }.thenBy { it.j }) + Assert.assertEquals("[(1, 1), (1, 2), (2, 1), (2, 2)]", cells.toString()) + } + + @Test + fun test01Cell() { + val board = createSquareBoard(2) + val cell = board.getCellOrNull(1, 2) + Assert.assertEquals(1, cell?.i) + Assert.assertEquals(2, cell?.j) + } + + @Test + fun test02NoCell() { + val board = createSquareBoard(2) + val cell = board.getCellOrNull(3, 3) + Assert.assertEquals(null, cell) + } + + @Test + fun test03Row() { + val board = createSquareBoard(2) + val row = board.getRow(1, 1..2) + Assert.assertEquals("[(1, 1), (1, 2)]", row.toString()) + } + + @Test + fun test04RowReversed() { + val board = createSquareBoard(2) + val row = board.getRow(1, 2 downTo 1) + Assert.assertEquals("[(1, 2), (1, 1)]", row.toString()) + } + + @Test + fun test05RowWrongRange() { + val board = createSquareBoard(2) + val row = board.getRow(1, 1..10) + Assert.assertEquals("[(1, 1), (1, 2)]", row.toString()) + } + + @Test + fun test06Neighbour() { + val board = createSquareBoard(2) + with(board) { + val cell = getCellOrNull(1, 1) + Assert.assertNotNull(cell) + Assert.assertEquals(null, cell!!.getNeighbour(Direction.UP)) + Assert.assertEquals(null, cell.getNeighbour(Direction.LEFT)) + Assert.assertEquals("(2, 1)", cell.getNeighbour(Direction.DOWN).toString()) + Assert.assertEquals("(1, 2)", cell.getNeighbour(Direction.RIGHT).toString()) + } + } + + @Test + fun test07AllCells() { + val board = createSquareBoard(3) + val cells = board.getAllCells().sortedWith(compareBy { it.i }.thenBy { it.j }) + Assert.assertEquals("Wrong result for 'getAllCells()' for the board of width 3.", + "[(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)]", + cells.toString()) + } + + @Test + fun test08Cell() { + val board = createSquareBoard(4) + val cell = board.getCellOrNull(2, 3) + Assert.assertEquals("The board of width 4 should contain the cell (2, 3).", + "(2, 3)", cell.toString()) + } + + @Test + fun test09NoCell() { + val board = createSquareBoard(4) + val cell = board.getCellOrNull(10, 10) + Assert.assertEquals("The board of width 4 should contain the cell (10, 10).", null, cell) + } + + @Test + fun test10Row() { + val row = createSquareBoard(4).getRow(1, 1..2) + Assert.assertEquals("Wrong row for 'createSquareBoard(4).getRow(1, 1..2)'.", + "[(1, 1), (1, 2)]", row.toString()) + } + + @Test + fun test11Column() { + val row = createSquareBoard(4).getColumn(1..2, 3) + Assert.assertEquals("Wrong column for 'createSquareBoard(4).getColumn(1..2, 3)'.", + "[(1, 3), (2, 3)]", row.toString()) + } + + @Test + fun test12RowReversedRange() { + val row = createSquareBoard(4).getRow(1, 4 downTo 1) + Assert.assertEquals("Wrong column for 'createSquareBoard(4).getRow(1, 4 downTo 1)'.", + "[(1, 4), (1, 3), (1, 2), (1, 1)]", row.toString()) + } + + @Test + fun test13ColumnReversedRange() { + val row = createSquareBoard(4).getColumn(2 downTo 1, 3) + Assert.assertEquals("Wrong column for 'createSquareBoard(4).getColumn(2 downTo 1, 3)'.", + "[(2, 3), (1, 3)]", row.toString()) + } + + @Test + fun test14ColumnWrongRange() { + val row = createSquareBoard(4).getColumn(3..6, 2) + Assert.assertEquals("Wrong column for 'createSquareBoard(4).getColumn(3..6, 2)'.", + "[(3, 2), (4, 2)]", row.toString()) + } + + private fun neighbourMessage(cell: Cell, direction: Direction) = + "Wrong neighbour for the cell $cell in a direction $direction." + + @Test + fun test15Neighbour() { + with(createSquareBoard(4)) { + val cell = getCellOrNull(2, 3) + Assert.assertNotNull("The board of width 4 should contain the cell (2, 3).", cell) + Assert.assertEquals(neighbourMessage(cell!!, Direction.UP), "(1, 3)", cell.getNeighbour(Direction.UP).toString()) + Assert.assertEquals(neighbourMessage(cell, Direction.DOWN), "(3, 3)", cell.getNeighbour(Direction.DOWN).toString()) + Assert.assertEquals(neighbourMessage(cell, Direction.LEFT), "(2, 2)", cell.getNeighbour(Direction.LEFT).toString()) + Assert.assertEquals(neighbourMessage(cell, Direction.RIGHT), "(2, 4)", cell.getNeighbour(Direction.RIGHT).toString()) + } + } + + @Test + fun test16NullableNeighbour() { + with(createSquareBoard(4)) { + val cell = getCellOrNull(4, 4) + Assert.assertNotNull("The board of width 4 should contain the cell (4, 4).", cell) + Assert.assertEquals(neighbourMessage(cell!!, Direction.UP), "(3, 4)", cell.getNeighbour(Direction.UP).toString()) + Assert.assertEquals(neighbourMessage(cell, Direction.LEFT), "(4, 3)", cell.getNeighbour(Direction.LEFT).toString()) + Assert.assertEquals(neighbourMessage(cell, Direction.DOWN), null, cell.getNeighbour(Direction.DOWN)) + Assert.assertEquals(neighbourMessage(cell, Direction.RIGHT), null, cell.getNeighbour(Direction.RIGHT)) + } + } + + @Test + fun test17TheSameCell() { + val board = createSquareBoard(4) + val first = board.getCell(1, 2) + val second = board.getCellOrNull(1, 2) + Assert.assertTrue("'getCell' and 'getCellOrNull' should return the same 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells " + + "should return existing cells instead of creating new ones.", + first === second) + } + + @Test + fun test18TheSameCell() { + val board = createSquareBoard(1) + val first = board.getAllCells().first() + val second = board.getCell(1, 1) + Assert.assertTrue("'getAllCells' and 'getCell' should return the same 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells " + + "should return existing cells instead of creating new ones.", + first === second) + } + + @Test + fun test19TheSameCell() { + val board = createSquareBoard(4) + val cell = board.getCell(1, 1) + val first = board.run { cell.getNeighbour(Direction.RIGHT) } + val second = board.getCell(1, 2) + Assert.assertTrue("'getNeighbour' shouldn't recreate the 'Cell' instance.\n" + + "Create only 'width * width' cells; all the functions working with cells " + + "should return existing cells instead of creating new ones.", + first === second) + } + + @Test + fun test20TheSameCell() { + val board = createSquareBoard(2) + val row = board.getRow(1, 1..1) + val first = row[0] + val second = board.getCell(1, 1) + Assert.assertTrue("'getRow' shouldn't recreate the 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells " + + "should return existing cells instead of creating new ones.", + first === second) + } + + @Test + fun test21TheSameCell() { + val board = createSquareBoard(2) + val column = board.getColumn(1..1, 2) + val first = column[0] + val second = board.getCell(1, 2) + Assert.assertTrue("'getColumn' shouldn't recreate the 'Cell' instances.\n" + + "Create only 'width * width' cells; all the functions working with cells " + + "should return existing cells instead of creating new ones.", + first === second) + } +} \ No newline at end of file diff --git a/src/test/kotlin/exercise7/LeagueTest.kt b/src/test/kotlin/exercise7/LeagueTest.kt new file mode 100644 index 0000000..636e916 --- /dev/null +++ b/src/test/kotlin/exercise7/LeagueTest.kt @@ -0,0 +1,209 @@ +package exercise7 + +import common.FileReader +import common.TestCase +import org.junit.jupiter.api.BeforeAll +import org.junit.jupiter.api.Test +import kotlin.io.path.readLines +import kotlin.test.assertEquals + +class LeagueTest : TestCase() { + companion object { + private lateinit var league: LeagueApi + + @JvmStatic + @BeforeAll + fun setup() { + val fixturesText = FileReader.readFileInResources("exercise7/fixtures.csv") + val fixtures = parseFixtures(fixturesText) + val teams = fixtures.flatMap { fixture -> + fixture.matches.flatMap { match -> listOf(match.awayTeam, match.homeTeam) } + }.distinct() + + league = League(teams, fixtures) + } + } + + private val testData = getTestData("exercise7/goals-scored.csv") + .readLines() + private val expectedGoalsScoredConcededEntries = ExpectedGoalsScoredConcededEntries(testData) + + @Test + fun `test - verify league table`() { + val expectedTableOrder = listOf( + "Manchester City" to 86, + "Manchester Utd" to 74, + "Liverpool" to 69, + "Chelsea" to 67, + "Leicester City" to 66, + "West Ham" to 65, + "Tottenham" to 62, + "Arsenal" to 61, + "Leeds United" to 59, + "Everton" to 59, + "Aston Villa" to 55, + "Newcastle Utd" to 45, + "Wolves" to 45, + "Crystal Palace" to 44, + "Southampton" to 43, + "Brighton" to 41, + "Burnley" to 39, + "Fulham" to 28, + "West Brom" to 26, + "Sheffield Utd" to 23, + ) + + assertEquals( + expectedTableOrder, + league.leagueTable.map { it.team.name to it.totalPoints }, + "League order doesn't match expected one." + ) + } + + @Test + fun getLeagueWinner() { + val actual = league.leagueWinner.name + assertEquals( + "Manchester City", + actual, + "Expected winner of the league is \"Manchester City\", but actual one was $actual." + ) + } + + @Test + fun getTeamWithMostWins() { + val actual = league.teamWithMostWins.name + assertEquals( + "Manchester City", + actual, + "Team with a most wins is \"Manchester City\", but the actual is $actual" + ) + } + + @Test + fun getTeamWithMostDraws() { + val actual = league.teamWithMostDraws.name + assertEquals( + "Brighton", + actual, + "Team with a most draws is \"Brighton\", but the actual is $actual" + ) + } + + @Test + fun getTeamWithMostLoses() { + val actual = league.teamWithMostLoses.name + assertEquals( + "Sheffield Utd", + actual, + "Team with a most draws is \"Sheffield Utd\", but the actual is $actual" + ) + } + + @Test + fun getTeamWithBestGoalDifference() { + val actual = league.teamWithBestGoalDifference.name + assertEquals( + "Manchester City", + actual, + "Team with a most draws is \"Manchester City\", but the actual is $actual" + ) + } + + @Test + fun teamsWithBestDefence() { + val actual = league.teamsWithBestDefence(3).map { it.name }.sorted() + val expected = listOf("Arsenal", "Chelsea", "Manchester City") + assertEquals( + expected, + actual, + "Team with a best defense are $expected, but the actual is $actual" + ) + } + + @Test + fun teamsWithBestOffense() { + val actual = league.teamsWithBestOffense(3).map { it.name }.sorted() + val expected = listOf("Liverpool", "Manchester City", "Manchester Utd") + assertEquals( + expected, + actual, + "Team with a best offense are $expected, but the actual is $actual" + ) + } + + @Test + fun numOfGoalsTeamScoredAgainst() { + doTestTeamAgainstTeam { (team, otherTeam) -> + val expectedScoredGoals = expectedGoalsScoredConcededEntries.numOfGoalsTeamScoredAgainst(team, otherTeam) + val actualScoredGoals = league.numOfGoalsTeamScoredAgainst(team, otherTeam) + + assertEquals( + expectedScoredGoals, + actualScoredGoals, + "Team ${team.name} scored $expectedScoredGoals against ${otherTeam.name} but actual was $actualScoredGoals" + ) + } + } + + @Test + fun numOfGoalsTeamConcededAgainst() { + doTestTeamAgainstTeam { (team, otherTeam) -> + val expectedConcededGoals = + expectedGoalsScoredConcededEntries.numOfGoalsTeamConcededAgainst(team, otherTeam) + val actualConcededGoals = league.numOfGoalsTeamConcededAgainst(team, otherTeam) + + assertEquals( + expectedConcededGoals, + actualConcededGoals, + "Team ${team.name} conceded $expectedConcededGoals against ${otherTeam.name} but actual was $actualConcededGoals" + ) + } + } + + private fun doTestTeamAgainstTeam(test: (Pair) -> Unit) { + val teams = league.teams + val teamAgainstEachTeam = teams.flatMap { team -> + teams.filter { otherTeam -> otherTeam != team } + .map { otherTeam -> team to otherTeam } + } + + teamAgainstEachTeam.forEach { teamToOtherTeam -> + test(teamToOtherTeam) + } + } + + private class ExpectedGoalsScoredConcededEntries( + testData: List + ) { + private val teamAgainstEachTeam = loadTeamGoalsScoredConcededExpectedEntries(testData) + + fun numOfGoalsTeamScoredAgainst(team: Team, otherTeam: Team): Int { + return teamAgainstEachTeam + .first { it.team == team.name && it.otherTeam == otherTeam.name } + .scoredGoals + } + + fun numOfGoalsTeamConcededAgainst(team: Team, otherTeam: Team): Int { + return teamAgainstEachTeam + .first { it.team == team.name && it.otherTeam == otherTeam.name } + .concededGoals + } + + private fun loadTeamGoalsScoredConcededExpectedEntries(testData: List): List { + return testData + .drop(1) + .map { line -> + val (team, otherTeam, scored, conceded) = line.trim('\t', '\n').trim().split(",") + ExpectedGoalsScoredConcededEntry(team, otherTeam, scored.toInt(), conceded.toInt()) + } + } + + private data class ExpectedGoalsScoredConcededEntry( + val team: String, + val otherTeam: String, + val scoredGoals: Int, + val concededGoals: Int + ) + } +} \ No newline at end of file diff --git a/src/test/kotlin/exercise8/MovieDBTest.kt b/src/test/kotlin/exercise8/MovieDBTest.kt new file mode 100644 index 0000000..1a9fa56 --- /dev/null +++ b/src/test/kotlin/exercise8/MovieDBTest.kt @@ -0,0 +1,87 @@ +package exercise8 + +import common.FileReader +import org.junit.jupiter.api.Test +import kotlin.test.assertEquals + + +class MovieDBTest { + private val movieDBApi: MovieDBApi = TODO("Instantiate object as follows: MovieDB(parseMovies(FileReader.readFileInResources(\"exercise8/movies.csv\")))") + + @Test + fun `test - api returns all movies by actor`() { + TestMovieDB.ACTORS_TO_EXPECTED_MOVIES.forEach { (actor, expectedMovies) -> + val actualMoviesByActor = movieDBApi.getAllMoviesByActor(actor) + .map { it.title } + .sorted() + + assertEquals(expectedMovies.sorted(), actualMoviesByActor) + } + } + + @Test + fun `test - api returns top 10 movies with a biggest profit`() { + val expectedTopGrossingMovies = TestMovieDB.TOP_10_BEST_GROSSING_MOVIES + + val actualMoviesWithBiggestProfits = movieDBApi.getMoviesWithBiggestProfit(expectedTopGrossingMovies.count()) + .map { it.title } + + assertEquals(expectedTopGrossingMovies, actualMoviesWithBiggestProfits) + } + + @Test + fun `test - api returns best rated movie by actor`() { + val actorsToExpectedBestRatedMovies = TestMovieDB.ACTOR_TO_BEST_RATED_MOVIES + + actorsToExpectedBestRatedMovies.forEach { (actor, expectedBestRatedMovie) -> + val actualBestRatedMovieTitle = movieDBApi.getBestRatedMovieByActor(actor)?.title + + assertEquals(expectedBestRatedMovie, actualBestRatedMovieTitle) + } + } + + @Test + fun `test - api returns all movies of year`() { + TestMovieDB.MOVIES_PER_YEAR.forEach { (year, expectedMovieTitlesOfYear) -> + val actualMovieTitlesOfYear = movieDBApi.getAllMoviesByYear(year) + .map { it.title } + + assertEquals(expectedMovieTitlesOfYear.sorted(), actualMovieTitlesOfYear.sorted()) + } + } + + @Test + fun `test - api returns all movies by genre`() { + val moviesPerGenre: Map> = TestMovieDB.MOVIES_BY_GENRE + + moviesPerGenre.forEach { (genre, expectedMovieTitles) -> + val actualMoviesTitlePeGenre = movieDBApi.getAllMoviesByGenre(genre).map { it.title } + + assertEquals(expectedMovieTitles.sorted(), actualMoviesTitlePeGenre.sorted()) + } + } + + @Test + fun `test - api returns top 10 best rated movies`() { + val expectedTop10BestRatedMovieTitles: List = TestMovieDB.TOP_10_BEST_RATED_MOVIES + + val actualMoviesTitlePeGenre = movieDBApi.getBestRatedMovies(expectedTop10BestRatedMovieTitles.count()) + .map { it.title } + + assertEquals(expectedTop10BestRatedMovieTitles.sorted(), actualMoviesTitlePeGenre.sorted()) + } + + @Test + fun `test - api returns director with most directed movies`() { + val actualMovieDirector = movieDBApi.getDirectorWithMostMoviesDirected() + + assertEquals(TestMovieDB.DIRECTOR_WITH_MOST_MOVIES_DIRECTED, actualMovieDirector.name) + } + + @Test + fun `test - api returns actors with most costarred movies`() { + val actorsWithMostCostarredMovies = movieDBApi.getActorsWithMostCostarredMovies() + + assertEquals(TestMovieDB.ACTOR_PAIRS_WITH_MOST_COSTARRED_MOVIES, actorsWithMostCostarredMovies) + } +} \ No newline at end of file diff --git a/src/test/kotlin/exercise8/TestMovieDB.kt b/src/test/kotlin/exercise8/TestMovieDB.kt new file mode 100644 index 0000000..bfca667 --- /dev/null +++ b/src/test/kotlin/exercise8/TestMovieDB.kt @@ -0,0 +1,643 @@ +package exercise8 + +object TestMovieDB { + /** + * Test data: actor pairs with the most costarred movies + */ + internal val ACTOR_PAIRS_WITH_MOST_COSTARRED_MOVIES = listOf( + MovieActor(name="Daniel Radcliffe") to MovieActor(name="Emma Watson"), + MovieActor(name="Daniel Radcliffe") to MovieActor(name="Rupert Grint"), + MovieActor(name="Emma Watson") to MovieActor(name="Rupert Grint"), + ) + + /** + * Test data: Director with the most directed movies. + */ + internal val DIRECTOR_WITH_MOST_MOVIES_DIRECTED = "Steven Spielberg" + + /** + * Test data: actors with their movies. + */ + internal val ACTORS_TO_EXPECTED_MOVIES: Map> = mapOf( + MovieActor("Johnny Depp") to listOf( + "Pirates of the Caribbean: On Stranger Tides", + "Pirates of the Caribbean: At World's End", + "The Lone Ranger", + "Pirates of the Caribbean: Dead Man's Chest", + "Charlie and the Chocolate Factory", + "Pirates of the Caribbean: The Curse of the Black Pearl", + "Rango", + "The Tourist", + "Transcendence", + "Public Enemies", + "The Astronaut's Wife", + ), + MovieActor("Robert Downey Jr.") to listOf( + "Avengers: Age of Ultron", + "Captain America: Civil War", + "The Avengers", + "Iron Man 3", + "Iron Man 2", + "Iron Man", + "Sherlock Holmes: A Game of Shadows", + "Tropic Thunder", + "Sherlock Holmes", + + ), + MovieActor("Ben Affleck") to listOf("Batman v Superman: Dawn of Justice"), + MovieActor("Gwyneth Paltrow") to listOf( + "Iron Man 3", + "Iron Man 2", + "Iron Man", + "Sky Captain and the World of Tomorrow", + + ), + MovieActor("Brad Pitt") to listOf( + "Troy", + "The Curious Case of Benjamin Button", + "Megamind", + "Ocean's Twelve", + "Mr. & Mrs. Smith", + "Spy Game", + "The Devil's Own", + "Ocean's Eleven", + "Ocean's Thirteen", + "Inglourious Basterds", + "Seven Years in Tibet", + ), + MovieActor("Tommy Lee Jones") to listOf( + "Men in Black 3", + "Men in Black II", + "Captain America: The First Avenger", + "Jason Bourne", + "Batman Forever", + "Men in Black", + "Volcano", + "Double Jeopardy", + ), + ) + + /** + * Test data: movies by the year of their release. + */ + internal val MOVIES_PER_YEAR = mapOf( + 1991 to listOf( + "Terminator 2: Judgment Day", + "Hook", + ), + 1999 to listOf( + "Payback", + "Message in a Bottle", + "Edtv", + "The Out-of-Towners", + "Star Wars: Episode I - The Phantom Menace", + "The Haunting", + "Inspector Gadget", + "Runaway Bride", + "The Astronaut's Wife", + "The 13th Warrior", + "Chill Factor", + "Double Jeopardy", + "Three Kings", + "The Insider", + "Toy Story 2", + "The Bone Collector", + "The World Is Not Enough", + "End of Days", + "Bicentennial Man", + "Man on the Moon", + ), + 2002 to listOf( + "Red Dragon", + "The Lord of the Rings: The Two Towers", + "The Adventures of Pluto Nash", + "I Spy", + "Harry Potter and the Chamber of Secrets", + "Bad Company", + "Hart's War", + "K-19: The Widowmaker", + "Windtalkers", + "Collateral Damage", + "We Were Soldiers", + "The Time Machine", + "Signs", + "Scooby-Doo", + "Spirit: Stallion of the Cimarron", + "Gangs of New York", + "Die Another Day", + "Ballistic: Ecks vs. Sever", + "Spider-Man", + "Men in Black II", + ), + 2003 to listOf( + "Tears of the Sun", + "X2", + "The Matrix Reloaded", + "Bruce Almighty", + "Finding Nemo", + "Hollywood Homicide", + "Hulk", + "Charlie's Angels: Full Throttle", + "Terminator 3: Rise of the Machines", + "Pirates of the Caribbean: The Curse of the Black Pearl", + "The League of Extraordinary Gentlemen", + "Bad Boys II", + "Lara Croft Tomb Raider: The Cradle of Life", + "Seabiscuit", + "S.W.A.T.", + "The Rundown", + "The Matrix Revolutions", + "Master and Commander: The Far Side of the World", + "Looney Tunes: Back in Action", + "The Haunted Mansion", + "Timeline", + "The Lord of the Rings: The Return of the King", + "The Last Samurai", + "Something's Gotta Give", + "Cold Mountain", + ), + 2016 to listOf( + "Kung Fu Panda 3", + "The Finest Hours", + "Gods of Egypt", + "Allegiant", + "Batman v Superman: Dawn of Justice", + "The Huntsman: Winter's War", + "The Jungle Book", + "Captain America: Civil War", + "The Angry Birds Movie", + "X-Men: Apocalypse", + "Warcraft", + "The BFG", + "Teenage Mutant Ninja Turtles: Out of the Shadows", + "Now You See Me 2", + "The Secret Life of Pets", + "Independence Day: Resurgence", + "Star Trek Beyond", + "Ghostbusters", + "Jason Bourne", + "Suicide Squad", + "Ben-Hur", + ) + ) + + /** + * Test data: The top 10 best grossing movies. + */ + internal val TOP_10_BEST_GROSSING_MOVIES = listOf( + "Avatar", + "Titanic", + "Furious 7", + "The Avengers", + "Avengers: Age of Ultron", + "Frozen", + "Minions", + "The Lord of the Rings: The Return of the King", + "Iron Man 3", + "Transformers: Dark of the Moon", + ) + + /** + * Test data: The top 10 best rated movies. + */ + internal val TOP_10_BEST_RATED_MOVIES = listOf( + "Minions", + "Interstellar", + "Guardians of the Galaxy", + "Mad Max: Fury Road", + "Pirates of the Caribbean: The Curse of the Black Pearl", + "Dawn of the Planet of the Apes", + "The Hunger Games: Mockingjay - Part 1", + "Big Hero 6", + "Terminator Genisys", + "Captain America: Civil War" + ) + + /** + * Test data: Actors with their best rated movies. + */ + internal val ACTOR_TO_BEST_RATED_MOVIES = mapOf( + MovieActor("Johnny Depp") to "Pirates of the Caribbean: The Curse of the Black Pearl", + MovieActor("Robert Downey Jr.") to "Captain America: Civil War", + MovieActor("Ben Affleck") to "Batman v Superman: Dawn of Justice", + MovieActor("Gwyneth Paltrow") to "Iron Man", + MovieActor("Brad Pitt") to "Ocean's Twelve", + MovieActor("Tommy Lee Jones") to "Men in Black" + ) + + /** + * Test data: Movies by genre. + */ + internal val MOVIES_BY_GENRE = mapOf( + "Action" to listOf( + "Die Hard 2", + "Terminator 2: Judgment Day", + "Batman Returns", + "Cliffhanger", + "Braveheart", + "Batman Forever", + "Cutthroat Island", + "Mission: Impossible", + "The Rock", + "Eraser", + "Independence Day", + "Ransom", + "The Saint", + "Volcano", + "The Fifth Element", + "The Lost World: Jurassic Park", + "Con Air", + "Speed 2: Cruise Control", + "Batman & Robin", + "Face/Off", + "Men in Black", + "Conspiracy Theory", + "Starship Troopers", + "Alien: Resurrection", + "Tomorrow Never Dies", + "Deep Impact", + "Six Days Seven Nights", + "Lethal Weapon 4", + "The Mask of Zorro", + "The Siege", + "Enemy of the State", + "Star Trek: Insurrection", + "Mighty Joe Young", + "Payback", + "Star Wars: Episode I - The Phantom Menace", + "Inspector Gadget", + "The 13th Warrior", + "Chill Factor", + "Three Kings", + "The World Is Not Enough", + "End of Days", + "Gladiator", + "Mission: Impossible II", + "Gone in Sixty Seconds", + "Titan A.E.", + "The Patriot", + "X-Men", + "Hollow Man", + "Charlie's Angels", + "Red Planet", + "Vertical Limit", + "Monkeybone", + "The Mummy Returns", + "Swordfish", + "Lara Croft: Tomb Raider", + "Final Fantasy: The Spirits Within", + "Planet of the Apes", + "The Last Castle", + "Spy Game", + "The Lord of the Rings: The Fellowship of the Ring", + "Black Hawk Down", + "Collateral Damage", + "We Were Soldiers", + "The Time Machine", + "Spider-Man", + "Bad Company", + "Windtalkers", + "Men in Black II", + "The Adventures of Pluto Nash", + "Ballistic: Ecks vs. Sever", + "I Spy", + "Die Another Day", + "The Lord of the Rings: The Two Towers", + "Tears of the Sun", + "X2", + "The Matrix Reloaded", + "Hollywood Homicide", + "Hulk", + "Charlie's Angels: Full Throttle", + "Terminator 3: Rise of the Machines", + "Pirates of the Caribbean: The Curse of the Black Pearl", + "The League of Extraordinary Gentlemen", + "Bad Boys II", + "Lara Croft Tomb Raider: The Cradle of Life", + "S.W.A.T.", + "The Rundown", + "The Matrix Revolutions", + "Timeline", + "The Lord of the Rings: The Return of the King", + "The Last Samurai", + "Man on Fire", + "The Stepford Wives", + "The Chronicles of Riddick", + "Spider-Man 2", + "I, Robot", + "Catwoman", + "The Bourne Supremacy", + "AVP: Alien vs. Predator", + "Sky Captain and the World of Tomorrow", + "The Incredibles", + "National Treasure", + "Kingdom of Heaven", + "A Sound of Thunder", + "Mr. & Mrs. Smith", + "Batman Begins", + "The Island", + "Stealth", + "The Great Raid", + "The Brothers Grimm", + "The Legend of Zorro", + "King Kong", + "Munich", + "Mission: Impossible III", + "Poseidon", + "X-Men: The Last Stand", + "The Fast and the Furious: Tokyo Drift", + "Pirates of the Caribbean: Dead Man's Chest", + "Superman Returns", + "Children of Men", + "Casino Royale", + "Blood Diamond", + "Eragon", + "디워", + "Ghost Rider", + "Pirates of the Caribbean: At World's End", + "4: Rise of the Silver Surfer", + "Live Free or Die Hard", + "Transformers", + "The Bourne Ultimatum", + "The Kingdom", + "Beowulf", + "I Am Legend", + "Iron Man", + "Speed Racer", + "Indiana Jones and the Kingdom of the Crystal Skull", + "You Don't Mess with the Zohan", + "Get Smart", + "Wanted", + "Hancock", + "The Mummy: Tomb of the Dragon Emperor", + "The Dark Knight", + "Tropic Thunder", + "Babylon A.D.", + "Eagle Eye", + "Body of Lies", + "Quantum of Solace", + "Dragonball Evolution", + "X-Men Origins: Wolverine", + "Star Trek", + "Night at the Museum: Battle of the Smithsonian", + "Transformers: Revenge of the Fallen", + "G-Force", + "G.I. Joe: The Rise of Cobra", + "Inglourious Basterds", + "Surrogates", + "2012", + "Avatar", + "Sherlock Holmes", + "The Book of Eli", + "Green Zone", + "Clash of the Titans", + "Iron Man 2", + "Prince of Persia: The Sands of Time", + "Killers", + "Knight and Day", + "The Last Airbender", + "The Sorcerer's Apprentice", + "Inception", + "Salt", + "The Expendables", + "Megamind", + "Unstoppable", + "The Nutcracker: The Untold Story", + "The Tourist", + "TRON: Legacy", + "The Green Hornet", + "Battle: Los Angeles", + "Sucker Punch", + "Thor", + "Pirates of the Caribbean: On Stranger Tides", + "X-Men: First Class", + "Green Lantern", + "Transformers: Dark of the Moon", + "Captain America: The First Avenger", + "Rise of the Planet of the Apes", + "The Three Musketeers", + "Real Steel", + "Tower Heist", + "Immortals", + "Sherlock Holmes: A Game of Shadows", + "Mission: Impossible - Ghost Protocol", + "Journey 2: The Mysterious Island", + "Underworld: Awakening", + "Safe House", + "The Avengers", + "Men in Black 3", + "Brave", + "The Amazing Spider-Man", + "The Dark Knight Rises", + "The Bourne Legacy", + "The Expendables 2", + "Skyfall", + "Life of Pi", + "The Hobbit: An Unexpected Journey", + "Jack the Giant Slayer", + "Olympus Has Fallen", + "G.I. Joe: Retaliation", + "Oblivion", + "Iron Man 3", + "Star Trek Into Darkness", + "After Earth", + "Man of Steel", + "White House Down", + "The Lone Ranger", + "Pacific Rim", + "R.I.P.D.", + "RED 2", + "Elysium", + "Ender's Game", + "Thor: The Dark World", + "The Hunger Games: Catching Fire", + "47 Ronin", + "The Legend of Hercules", + "The Monuments Men", + "Pompeii", + "300: Rise of an Empire", + "Divergent", + "The Amazing Spider-Man 2", + "X-Men: Days of Future Past", + "Edge of Tomorrow", + "Maleficent", + "How to Train Your Dragon 2", + "Transformers: Age of Extinction", + "Dawn of the Planet of the Apes", + "Hercules", + "Guardians of the Galaxy", + "The Expendables 3", + "Teenage Mutant Ninja Turtles", + "Dracula Untold", + "Big Hero 6", + "Exodus: Gods and Kings", + "The Hobbit: The Battle of the Five Armies", + "Jupiter Ascending", + "Furious 7", + "Avengers: Age of Ultron", + "Mad Max: Fury Road", + "San Andreas", + "Terminator Genisys", + "Ant-Man", + "Pixels", + "Mission: Impossible - Rogue Nation", + "The Man from U.N.C.L.E.", + "Spectre", + "The Hunger Games: Mockingjay - Part 2", + "In the Heart of the Sea", + "Point Break", + "Kung Fu Panda 3", + "The Finest Hours", + "Batman v Superman: Dawn of Justice", + "The Huntsman: Winter's War", + "Captain America: Civil War", + "Warcraft", + "Teenage Mutant Ninja Turtles: Out of the Shadows", + "Now You See Me 2", + "Independence Day: Resurgence", + "Star Trek Beyond", + "Ghostbusters", + "Jason Bourne", + "Suicide Squad", + ), + "Comedy" to listOf( + "Hook", + "Mars Attacks!", + "Men in Black", + "Flubber", + "Six Days Seven Nights", + "Doctor Dolittle", + "Lethal Weapon 4", + "A Bug's Life", + "Babe: Pig in the City", + "Edtv", + "The Out-of-Towners", + "Inspector Gadget", + "Runaway Bride", + "Chill Factor", + "Three Kings", + "Toy Story 2", + "Bicentennial Man", + "Man on the Moon", + "The Flintstones in Viva Rock Vegas", + "Nutty Professor II: The Klumps", + "102 Dalmatians", + "Charlie's Angels", + "How the Grinch Stole Christmas", + "The Emperor's New Groove", + "What Women Want", + "Monkeybone", + "Town & Country", + "Monsters, Inc.", + "Spirit: Stallion of the Cimarron", + "Bad Company", + "Scooby-Doo", + "Men in Black II", + "The Adventures of Pluto Nash", + "I Spy", + "Bruce Almighty", + "Hollywood Homicide", + "Charlie's Angels: Full Throttle", + "Bad Boys II", + "The Rundown", + "Looney Tunes: Back in Action", + "The Haunted Mansion", + "Something's Gotta Give", + "50 First Dates", + "Shrek 2", + "The Stepford Wives", + "Spanglish", + "Son of the Mask", + "Robots", + "Mr. & Mrs. Smith", + "Charlie and the Chocolate Factory", + "The Brothers Grimm", + "Chicken Little", + "Fun with Dick and Jane", + "Over the Hedge", + "Cars", + "Click", + "Monster House", + "Flushed Away", + "Happy Feet", + "The Holiday", + "Shrek the Third", + "Surf's Up", + "Ratatouille", + "The Simpsons Movie", + "Bee Movie", + "Enchanted", + "Astérix aux Jeux Olympiques", + "Fool's Gold", + "Kung Fu Panda", + "You Don't Mess with the Zohan", + "Get Smart", + "Tropic Thunder", + "Bolt", + "Four Christmases", + "Yes Man", + "Bedtime Stories", + "Up", + "Night at the Museum: Battle of the Smithsonian", + "Land of the Lost", + "Ice Age: Dawn of the Dinosaurs", + "G-Force", + "Funny People", + "Cloudy with a Chance of Meatballs", + "Couples Retreat", + "It's Complicated", + "Shrek Forever After", + "Killers", + "Knight and Day", + "Toy Story 3", + "Grown Ups", + "The Sorcerer's Apprentice", + "Cats & Dogs 2 : The Revenge of Kitty Galore", + "Dinner for Schmucks", + "Megamind", + "Yogi Bear", + "How Do You Know", + "Gulliver's Travels", + "The Green Hornet", + "The Dilemma", + "Just Go with It", + "Rango", + "The Hangover Part II", + "Cars 2", + "Zookeeper", + "Tower Heist", + "Jack and Jill", + "Happy Feet Two", + "Alvin and the Chipmunks: Chipwrecked", + "Mirror Mirror", + "Men in Black 3", + "Rock of Ages", + "Brave", + "Hotel Transylvania", + "The Croods", + "Despicable Me 2", + "Grown Ups 2", + "R.I.P.D.", + "RED 2", + "Cloudy with a Chance of Meatballs 2", + "The Secret Life of Walter Mitty", + "The Wolf of Wall Street", + "Rio 2", + "How to Train Your Dragon 2", + "Teenage Mutant Ninja Turtles", + "Big Hero 6", + "Penguins of Madagascar", + "Night at the Museum: Secret of the Tomb", + "The SpongeBob Movie: Sponge Out of Water", + "Inside Out", + "Minions", + "Pixels", + "The Man from U.N.C.L.E.", + "Hotel Transylvania 2", + "Kung Fu Panda 3", + "Teenage Mutant Ninja Turtles: Out of the Shadows", + "Now You See Me 2", + "Ghostbusters", + ) + ) +} \ No newline at end of file diff --git a/src/test/resources/testdata/exercise7/goals-scored.csv b/src/test/resources/testdata/exercise7/goals-scored.csv new file mode 100644 index 0000000..33c16d4 --- /dev/null +++ b/src/test/resources/testdata/exercise7/goals-scored.csv @@ -0,0 +1,381 @@ +team,otherTeam,scoredGoals,concededGoals +Arsenal,Fulham,4,1 +Arsenal,Southampton,4,2 +Arsenal,Crystal Palace,3,1 +Arsenal,Leeds United,4,2 +Arsenal,Liverpool,1,6 +Arsenal,Newcastle Utd,5,0 +Arsenal,West Ham,5,4 +Arsenal,Leicester City,3,2 +Arsenal,West Brom,7,1 +Arsenal,Everton,1,3 +Arsenal,Tottenham,2,3 +Arsenal,Wolves,2,4 +Arsenal,Sheffield Utd,5,1 +Arsenal,Chelsea,4,1 +Arsenal,Brighton,3,0 +Arsenal,Manchester Utd,1,0 +Arsenal,Burnley,1,2 +Arsenal,Aston Villa,0,4 +Arsenal,Manchester City,0,2 +Fulham,Arsenal,1,4 +Fulham,Southampton,1,3 +Fulham,Crystal Palace,1,2 +Fulham,Leeds United,4,6 +Fulham,Liverpool,2,1 +Fulham,Newcastle Utd,1,3 +Fulham,West Ham,0,1 +Fulham,Leicester City,2,3 +Fulham,West Brom,4,2 +Fulham,Everton,4,3 +Fulham,Tottenham,1,2 +Fulham,Wolves,0,2 +Fulham,Sheffield Utd,2,1 +Fulham,Chelsea,0,3 +Fulham,Brighton,0,0 +Fulham,Manchester Utd,2,3 +Fulham,Burnley,1,3 +Fulham,Aston Villa,1,6 +Fulham,Manchester City,0,5 +Southampton,Arsenal,2,4 +Southampton,Fulham,3,1 +Southampton,Crystal Palace,3,2 +Southampton,Leeds United,0,5 +Southampton,Liverpool,1,2 +Southampton,Newcastle Utd,4,3 +Southampton,West Ham,0,3 +Southampton,Leicester City,1,3 +Southampton,West Brom,2,3 +Southampton,Everton,2,1 +Southampton,Tottenham,3,7 +Southampton,Wolves,2,3 +Southampton,Sheffield Utd,5,0 +Southampton,Chelsea,4,4 +Southampton,Brighton,3,3 +Southampton,Manchester Utd,2,12 +Southampton,Burnley,4,2 +Southampton,Aston Villa,4,4 +Southampton,Manchester City,2,6 +Crystal Palace,Arsenal,1,3 +Crystal Palace,Fulham,2,1 +Crystal Palace,Southampton,2,3 +Crystal Palace,Leeds United,4,3 +Crystal Palace,Liverpool,0,9 +Crystal Palace,Newcastle Utd,2,3 +Crystal Palace,West Ham,3,4 +Crystal Palace,Leicester City,2,3 +Crystal Palace,West Brom,6,1 +Crystal Palace,Everton,2,3 +Crystal Palace,Tottenham,2,5 +Crystal Palace,Wolves,1,2 +Crystal Palace,Sheffield Utd,4,0 +Crystal Palace,Chelsea,1,8 +Crystal Palace,Brighton,3,2 +Crystal Palace,Manchester Utd,3,1 +Crystal Palace,Burnley,0,4 +Crystal Palace,Aston Villa,3,5 +Crystal Palace,Manchester City,0,6 +Leeds United,Arsenal,2,4 +Leeds United,Fulham,6,4 +Leeds United,Southampton,5,0 +Leeds United,Crystal Palace,3,4 +Leeds United,Liverpool,4,5 +Leeds United,Newcastle Utd,7,3 +Leeds United,West Ham,1,4 +Leeds United,Leicester City,4,5 +Leeds United,West Brom,8,1 +Leeds United,Everton,2,2 +Leeds United,Tottenham,3,4 +Leeds United,Wolves,0,2 +Leeds United,Sheffield Utd,3,1 +Leeds United,Chelsea,1,3 +Leeds United,Brighton,0,3 +Leeds United,Manchester Utd,2,6 +Leeds United,Burnley,5,0 +Leeds United,Aston Villa,3,1 +Leeds United,Manchester City,3,2 +Liverpool,Arsenal,6,1 +Liverpool,Fulham,1,2 +Liverpool,Southampton,2,1 +Liverpool,Crystal Palace,9,0 +Liverpool,Leeds United,5,4 +Liverpool,Newcastle Utd,1,1 +Liverpool,West Ham,5,2 +Liverpool,Leicester City,4,3 +Liverpool,West Brom,3,2 +Liverpool,Everton,2,4 +Liverpool,Tottenham,5,2 +Liverpool,Wolves,5,0 +Liverpool,Sheffield Utd,4,1 +Liverpool,Chelsea,2,1 +Liverpool,Brighton,1,2 +Liverpool,Manchester Utd,4,2 +Liverpool,Burnley,3,1 +Liverpool,Aston Villa,4,8 +Liverpool,Manchester City,2,5 +Newcastle Utd,Arsenal,0,5 +Newcastle Utd,Fulham,3,1 +Newcastle Utd,Southampton,3,4 +Newcastle Utd,Crystal Palace,3,2 +Newcastle Utd,Leeds United,3,7 +Newcastle Utd,Liverpool,1,1 +Newcastle Utd,West Ham,5,2 +Newcastle Utd,Leicester City,5,4 +Newcastle Utd,West Brom,2,1 +Newcastle Utd,Everton,4,1 +Newcastle Utd,Tottenham,3,3 +Newcastle Utd,Wolves,2,2 +Newcastle Utd,Sheffield Utd,1,1 +Newcastle Utd,Chelsea,0,4 +Newcastle Utd,Brighton,0,6 +Newcastle Utd,Manchester Utd,2,7 +Newcastle Utd,Burnley,5,2 +Newcastle Utd,Aston Villa,1,3 +Newcastle Utd,Manchester City,3,6 +West Ham,Arsenal,4,5 +West Ham,Fulham,1,0 +West Ham,Southampton,3,0 +West Ham,Crystal Palace,4,3 +West Ham,Leeds United,4,1 +West Ham,Liverpool,2,5 +West Ham,Newcastle Utd,2,5 +West Ham,Leicester City,6,2 +West Ham,West Brom,5,2 +West Ham,Everton,1,1 +West Ham,Tottenham,5,4 +West Ham,Wolves,7,2 +West Ham,Sheffield Utd,4,0 +West Ham,Chelsea,0,4 +West Ham,Brighton,3,3 +West Ham,Manchester Utd,1,4 +West Ham,Burnley,3,1 +West Ham,Aston Villa,5,2 +West Ham,Manchester City,2,3 +Leicester City,Arsenal,2,3 +Leicester City,Fulham,3,2 +Leicester City,Southampton,3,1 +Leicester City,Crystal Palace,3,2 +Leicester City,Leeds United,5,4 +Leicester City,Liverpool,3,4 +Leicester City,Newcastle Utd,4,5 +Leicester City,West Ham,2,6 +Leicester City,West Brom,6,0 +Leicester City,Everton,1,3 +Leicester City,Tottenham,4,4 +Leicester City,Wolves,1,0 +Leicester City,Sheffield Utd,7,1 +Leicester City,Chelsea,3,2 +Leicester City,Brighton,5,1 +Leicester City,Manchester Utd,4,3 +Leicester City,Burnley,5,3 +Leicester City,Aston Villa,2,2 +Leicester City,Manchester City,5,4 +West Brom,Arsenal,1,7 +West Brom,Fulham,2,4 +West Brom,Southampton,3,2 +West Brom,Crystal Palace,1,6 +West Brom,Leeds United,1,8 +West Brom,Liverpool,2,3 +West Brom,Newcastle Utd,1,2 +West Brom,West Ham,2,5 +West Brom,Leicester City,0,6 +West Brom,Everton,2,6 +West Brom,Tottenham,0,3 +West Brom,Wolves,4,3 +West Brom,Sheffield Utd,2,2 +West Brom,Chelsea,8,5 +West Brom,Brighton,2,1 +West Brom,Manchester Utd,1,2 +West Brom,Burnley,0,0 +West Brom,Aston Villa,2,5 +West Brom,Manchester City,1,6 +Everton,Arsenal,3,1 +Everton,Fulham,3,4 +Everton,Southampton,1,2 +Everton,Crystal Palace,3,2 +Everton,Leeds United,2,2 +Everton,Liverpool,4,2 +Everton,Newcastle Utd,1,4 +Everton,West Ham,1,1 +Everton,Leicester City,3,1 +Everton,West Brom,6,2 +Everton,Tottenham,3,2 +Everton,Wolves,3,1 +Everton,Sheffield Utd,1,1 +Everton,Chelsea,1,2 +Everton,Brighton,4,2 +Everton,Manchester Utd,4,6 +Everton,Burnley,2,3 +Everton,Aston Villa,1,2 +Everton,Manchester City,1,8 +Tottenham,Arsenal,3,2 +Tottenham,Fulham,2,1 +Tottenham,Southampton,7,3 +Tottenham,Crystal Palace,5,2 +Tottenham,Leeds United,4,3 +Tottenham,Liverpool,2,5 +Tottenham,Newcastle Utd,3,3 +Tottenham,West Ham,4,5 +Tottenham,Leicester City,4,4 +Tottenham,West Brom,3,0 +Tottenham,Everton,2,3 +Tottenham,Wolves,3,1 +Tottenham,Sheffield Utd,7,1 +Tottenham,Chelsea,0,1 +Tottenham,Brighton,2,2 +Tottenham,Manchester Utd,7,4 +Tottenham,Burnley,5,0 +Tottenham,Aston Villa,3,2 +Tottenham,Manchester City,2,3 +Wolves,Arsenal,4,2 +Wolves,Fulham,2,0 +Wolves,Southampton,3,2 +Wolves,Crystal Palace,2,1 +Wolves,Leeds United,2,0 +Wolves,Liverpool,0,5 +Wolves,Newcastle Utd,2,2 +Wolves,West Ham,2,7 +Wolves,Leicester City,0,1 +Wolves,West Brom,3,4 +Wolves,Everton,1,3 +Wolves,Tottenham,1,3 +Wolves,Sheffield Utd,3,0 +Wolves,Chelsea,2,1 +Wolves,Brighton,5,4 +Wolves,Manchester Utd,1,3 +Wolves,Burnley,1,6 +Wolves,Aston Villa,0,1 +Wolves,Manchester City,2,7 +Sheffield Utd,Arsenal,1,5 +Sheffield Utd,Fulham,1,2 +Sheffield Utd,Southampton,0,5 +Sheffield Utd,Crystal Palace,0,4 +Sheffield Utd,Leeds United,1,3 +Sheffield Utd,Liverpool,1,4 +Sheffield Utd,Newcastle Utd,1,1 +Sheffield Utd,West Ham,0,4 +Sheffield Utd,Leicester City,1,7 +Sheffield Utd,West Brom,2,2 +Sheffield Utd,Everton,1,1 +Sheffield Utd,Tottenham,1,7 +Sheffield Utd,Wolves,0,3 +Sheffield Utd,Chelsea,2,6 +Sheffield Utd,Brighton,2,1 +Sheffield Utd,Manchester Utd,4,4 +Sheffield Utd,Burnley,1,1 +Sheffield Utd,Aston Villa,1,1 +Sheffield Utd,Manchester City,0,2 +Chelsea,Arsenal,1,4 +Chelsea,Fulham,3,0 +Chelsea,Southampton,4,4 +Chelsea,Crystal Palace,8,1 +Chelsea,Leeds United,3,1 +Chelsea,Liverpool,1,2 +Chelsea,Newcastle Utd,4,0 +Chelsea,West Ham,4,0 +Chelsea,Leicester City,2,3 +Chelsea,West Brom,5,8 +Chelsea,Everton,2,1 +Chelsea,Tottenham,1,0 +Chelsea,Wolves,1,2 +Chelsea,Sheffield Utd,6,2 +Chelsea,Brighton,3,1 +Chelsea,Manchester Utd,0,0 +Chelsea,Burnley,5,0 +Chelsea,Aston Villa,2,3 +Chelsea,Manchester City,3,4 +Brighton,Arsenal,0,3 +Brighton,Fulham,0,0 +Brighton,Southampton,3,3 +Brighton,Crystal Palace,2,3 +Brighton,Leeds United,3,0 +Brighton,Liverpool,2,1 +Brighton,Newcastle Utd,6,0 +Brighton,West Ham,3,3 +Brighton,Leicester City,1,5 +Brighton,West Brom,1,2 +Brighton,Everton,2,4 +Brighton,Tottenham,2,2 +Brighton,Wolves,4,5 +Brighton,Sheffield Utd,1,2 +Brighton,Chelsea,1,3 +Brighton,Manchester Utd,3,5 +Brighton,Burnley,1,1 +Brighton,Aston Villa,2,1 +Brighton,Manchester City,3,3 +Manchester Utd,Arsenal,0,1 +Manchester Utd,Fulham,3,2 +Manchester Utd,Southampton,12,2 +Manchester Utd,Crystal Palace,1,3 +Manchester Utd,Leeds United,6,2 +Manchester Utd,Liverpool,2,4 +Manchester Utd,Newcastle Utd,7,2 +Manchester Utd,West Ham,4,1 +Manchester Utd,Leicester City,3,4 +Manchester Utd,West Brom,2,1 +Manchester Utd,Everton,6,4 +Manchester Utd,Tottenham,4,7 +Manchester Utd,Wolves,3,1 +Manchester Utd,Sheffield Utd,4,4 +Manchester Utd,Chelsea,0,0 +Manchester Utd,Brighton,5,3 +Manchester Utd,Burnley,4,1 +Manchester Utd,Aston Villa,5,2 +Manchester Utd,Manchester City,2,0 +Burnley,Arsenal,2,1 +Burnley,Fulham,3,1 +Burnley,Southampton,2,4 +Burnley,Crystal Palace,4,0 +Burnley,Leeds United,0,5 +Burnley,Liverpool,1,3 +Burnley,Newcastle Utd,2,5 +Burnley,West Ham,1,3 +Burnley,Leicester City,3,5 +Burnley,West Brom,0,0 +Burnley,Everton,3,2 +Burnley,Tottenham,0,5 +Burnley,Wolves,6,1 +Burnley,Sheffield Utd,1,1 +Burnley,Chelsea,0,5 +Burnley,Brighton,1,1 +Burnley,Manchester Utd,1,4 +Burnley,Aston Villa,3,2 +Burnley,Manchester City,0,7 +Aston Villa,Arsenal,4,0 +Aston Villa,Fulham,6,1 +Aston Villa,Southampton,4,4 +Aston Villa,Crystal Palace,5,3 +Aston Villa,Leeds United,1,3 +Aston Villa,Liverpool,8,4 +Aston Villa,Newcastle Utd,3,1 +Aston Villa,West Ham,2,5 +Aston Villa,Leicester City,2,2 +Aston Villa,West Brom,5,2 +Aston Villa,Everton,2,1 +Aston Villa,Tottenham,2,3 +Aston Villa,Wolves,1,0 +Aston Villa,Sheffield Utd,1,1 +Aston Villa,Chelsea,3,2 +Aston Villa,Brighton,1,2 +Aston Villa,Manchester Utd,2,5 +Aston Villa,Burnley,2,3 +Aston Villa,Manchester City,1,4 +Manchester City,Arsenal,2,0 +Manchester City,Fulham,5,0 +Manchester City,Southampton,6,2 +Manchester City,Crystal Palace,6,0 +Manchester City,Leeds United,2,3 +Manchester City,Liverpool,5,2 +Manchester City,Newcastle Utd,6,3 +Manchester City,West Ham,3,2 +Manchester City,Leicester City,4,5 +Manchester City,West Brom,6,1 +Manchester City,Everton,8,1 +Manchester City,Tottenham,3,2 +Manchester City,Wolves,7,2 +Manchester City,Sheffield Utd,2,0 +Manchester City,Chelsea,4,3 +Manchester City,Brighton,3,3 +Manchester City,Manchester Utd,0,2 +Manchester City,Burnley,7,0 +Manchester City,Aston Villa,4,1 \ No newline at end of file