<commit_before>package org.otw.open.screens

import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.{Color, GL20}
import com.badlogic.gdx.math.Vector2
import com.badlogic.gdx.utils.Disposable
import org.otw.open.actors.MenuButtonActor
import org.otw.open.controllers.{GameState, ToTheme}
import org.otw.open.dto.Theme
import org.otw.open.listeners.{DispatchEventListener, ThemeChoiceListener}

import scala.collection.mutable.ListBuffer

/**
  * Created by smirakovska on 2/23/2016.
  */
class MainMenuScreen extends AbstractGameScreen with Disposable {

  /**
    * all existing themes to choose between
    */
  var themes: Map[String, Theme] = GameState.getThemeSettings

  var themesList = new ListBuffer[MenuButtonActor]()

  /** for row count */
  var index = 0

  var gridRowCount = 0

  themes.foreach(theme => {
    val actor = new MenuButtonActor(new Vector2(100 + index * 250, 600 - gridRowCount * 300), theme._1 + ".png", theme._1)
    if (gridRowCount == 2) gridRowCount = 0
    val toTheme = ToTheme
    toTheme.themeName = theme._1
    actor.addListener(new ThemeChoiceListener(theme._1))
    actor.addListener(new DispatchEventListener(ToTheme))
    themesList += actor
    index += 1
    if (index % 5 == 0 && index != 0) {<commit_msg>Resolve Merge conflicts<commit_after>package org.otw.open.screens

import com.badlogic.gdx.Gdx
import com.badlogic.gdx.graphics.{Color, GL20}
import com.badlogic.gdx.math.Vector2
import com.badlogic.gdx.utils.Disposable
import org.otw.open.actors.MenuButtonActor
import org.otw.open.controllers.{GameState, ToTheme}
import org.otw.open.dto.Theme
import org.otw.open.listeners.{DispatchEventListener, ThemeChoiceListener}

import scala.collection.mutable.ListBuffer

/**
  * Created by smirakovska on 2/23/2016.
  */
class MainMenuScreen extends AbstractGameScreen with Disposable {

  /**
    * all existing themes to choose between
    */
  val themes: Map[String, Theme] = GameState.getThemeSettings

  var themesList = new ListBuffer[MenuButtonActor]()

  /** for row count */
  var index = 0

  var gridRowCount = 0

  themes.foreach(theme => {
    val actor = new MenuButtonActor(new Vector2(100 + index * 250, 600 - gridRowCount * 300), theme._1 + ".png", theme._1)
    if (gridRowCount == 2) gridRowCount = 0
    val toTheme = ToTheme
    toTheme.themeName = theme._1
    actor.addListener(new ThemeChoiceListener(theme._1))
    actor.addListener(new DispatchEventListener(ToTheme))
    themesList += actor
    index += 1
    if (index % 5 == 0 && index != 0) {
{'fraction_non_alphanumeric': 0.11084718923198733, 'fraction_numerical': 0.027711797307996833, 'mean_word_length': 3.9452054794520546, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2488962', 'n_tokens_mistral': 874, 'n_tokens_neox': 802, 'n_words': 194}