package org.sistema.spring.autowiring;

import org.sistema.spring.autowiring.models.Combat;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
 * Main class.
 * 
 * @author Eugenia Pérez Martínez
 * @email eugenia_perez@cuatrovientos.org
 */

public class Main {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext(
				"beans.xml");
		Combat combat = (Combat) context.getBean("combat");
		combat.combat();
		System.out.println("And the winner is: " + combat.outcome().getName());
		System.out.println("Thanks for playing javamon");
	}

}
