package main

import "errors"

func GetGun(gunType string) (IGun,error){
	if gunType == "ak47" {
		return newAk47(),nil
	}
	if gunType == "musket" {
		return newMusket(),nil
	}
	return nil,errors.New("No such a gun")
}