import { Component, Renderer2 } from '@angular/core';
import { Router } from '@angular/router';
import { AlertService } from '../services/alert.service';
import { GameService } from '../services/game.service';

@Component({
  selector: 'app-home',
  templateUrl: 'valuesRanking.page.html',
  styleUrls: ['valuesRanking.page.scss'],
})
export class ValuesRankingPage {

  constructor(private router: Router, private game: GameService, public alert: AlertService) {}

  reorderItems(ev) {
    const itemMove = this.game.cardset.splice(ev.detail.from, 1)[0];
    this.game.cardset.splice(ev.detail.to, 0, itemMove);
    ev.detail.complete();
  }
}
